]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/xe/display: Add check for alloc_ordered_workqueue()
authorHaoxiang Li <haoxiang_li2024@163.com>
Fri, 16 May 2025 12:16:55 +0000 (15:16 +0300)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Tue, 24 Jun 2025 18:18:31 +0000 (20:18 +0200)
Add check for the return value of alloc_ordered_workqueue()
in xe_display_create() to catch potential exception.

Fixes: 44e694958b95 ("drm/xe/display: Implement display support")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://lore.kernel.org/r/4ee1b0e5d1626ce1dde2e82af05c2edaed50c3aa.1747397638.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
(cherry picked from commit 5b62d63395d5b7d4094e7cd380bccae4b25415cb)
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
drivers/gpu/drm/xe/display/xe_display.c

index 68f064f33d4b87d868100b4fea5fc69199196f3b..9f4ade25787aa716ba1a2e339d20c0dc7b50e405 100644 (file)
@@ -104,6 +104,8 @@ int xe_display_create(struct xe_device *xe)
        spin_lock_init(&xe->display.fb_tracking.lock);
 
        xe->display.hotplug.dp_wq = alloc_ordered_workqueue("xe-dp", 0);
+       if (!xe->display.hotplug.dp_wq)
+               return -ENOMEM;
 
        return drmm_add_action_or_reset(&xe->drm, display_destroy, NULL);
 }