Skip to content

Commit ce29214

Browse files
mbrost05lucasdemarchi
authored andcommitted
drm/xe: Check return value of GGTT workqueue allocation
Workqueue allocation can fail, so check the return value of the GGTT workqueue allocation and fail driver initialization if the allocation fails. Fixes: dd08ebf ("drm/xe: Introduce a new DRM driver for Intel GPUs") Cc: [email protected] Signed-off-by: Matthew Brost <[email protected]> Reviewed-by: Matthew Auld <[email protected]> Link: https://lore.kernel.org/r/[email protected] (cherry picked from commit 1f1314e8e71385bae319e43082b798c11f6648bc) Signed-off-by: Lucas De Marchi <[email protected]>
1 parent ce831bf commit ce29214

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/gpu/drm/xe/xe_ggtt.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,9 @@ int xe_ggtt_init_early(struct xe_ggtt *ggtt)
292292
ggtt->pt_ops = &xelp_pt_ops;
293293

294294
ggtt->wq = alloc_workqueue("xe-ggtt-wq", 0, WQ_MEM_RECLAIM);
295+
if (!ggtt->wq)
296+
return -ENOMEM;
297+
295298
__xe_ggtt_init_early(ggtt, xe_wopcm_size(xe));
296299

297300
err = drmm_add_action_or_reset(&xe->drm, ggtt_fini_early, ggtt);

0 commit comments

Comments
 (0)