[PATCH 2/7] drm/xe/display: Add check for alloc_ordered_workqueue()

Matthew Auld matthew.auld at intel.com
Fri May 16 14:05:57 UTC 2025


On 16/05/2025 13:16, Jani Nikula wrote:
> From: Haoxiang Li <haoxiang_li2024 at 163.com>
> 
> 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 at vger.kernel.org
> Signed-off-by: Haoxiang Li <haoxiang_li2024 at 163.com>
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>

Reviewed-by: Matthew Auld <matthew.auld at intel.com>

> ---
>   drivers/gpu/drm/xe/display/xe_display.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
> index 699f401eff10..df897d08255c 100644
> --- a/drivers/gpu/drm/xe/display/xe_display.c
> +++ b/drivers/gpu/drm/xe/display/xe_display.c
> @@ -112,6 +112,8 @@ int xe_display_create(struct xe_device *xe)
>   	spin_lock_init(&display->fb_tracking.lock);
>   
>   	display->hotplug.dp_wq = alloc_ordered_workqueue("xe-dp", 0);
> +	if (!display->hotplug.dp_wq)
> +		return -ENOMEM;
>   
>   	return drmm_add_action_or_reset(&xe->drm, display_destroy, NULL);
>   }



More information about the Intel-gfx mailing list