summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vkms
diff options
context:
space:
mode:
authorMatthew Brost <matthew.brost@intel.com>2025-07-02 16:28:31 -0700
committerMatthew Brost <matthew.brost@intel.com>2025-07-03 10:14:56 -0700
commit86c947b363f003153768d879ee15f8358cbf29c5 (patch)
treea0b8b3af8fe5ee896ee582c8fc1b0ad7663e06c7 /drivers/gpu/drm/vkms
parentb4cd18f485687a2061ee7a0ce6833851fc4438da (diff)
downloadlinux-next-86c947b363f003153768d879ee15f8358cbf29c5.tar.gz
linux-next-86c947b363f003153768d879ee15f8358cbf29c5.zip
drm: Simplify drmm_alloc_ordered_workqueue return
Rather than returning ERR_PTR or NULL on failure, replace the NULL return with ERR_PTR(-ENOMEM). This simplifies error handling at the caller. While here, add kernel documentation for drmm_alloc_ordered_workqueue. Cc: Louis Chauvet <louis.chauvet@bootlin.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com> Link: https://lore.kernel.org/r/20250702232831.3271328-2-matthew.brost@intel.com
Diffstat (limited to 'drivers/gpu/drm/vkms')
-rw-r--r--drivers/gpu/drm/vkms/vkms_crtc.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c b/drivers/gpu/drm/vkms/vkms_crtc.c
index 8c9898b9055d..e60573e0f3e9 100644
--- a/drivers/gpu/drm/vkms/vkms_crtc.c
+++ b/drivers/gpu/drm/vkms/vkms_crtc.c
@@ -302,8 +302,6 @@ struct vkms_output *vkms_crtc_init(struct drm_device *dev, struct drm_plane *pri
vkms_out->composer_workq = drmm_alloc_ordered_workqueue(dev, "vkms_composer", 0);
if (IS_ERR(vkms_out->composer_workq))
return ERR_CAST(vkms_out->composer_workq);
- if (!vkms_out->composer_workq)
- return ERR_PTR(-ENOMEM);
return vkms_out;
}