Skip to content

Commit 1f1314e

Browse files
committed
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: stable@vger.kernel.org Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://lore.kernel.org/r/20251022005538.828980-2-matthew.brost@intel.com
1 parent 13fb4b3 commit 1f1314e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/gpu/drm/xe/xe_ggtt.c

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

314314
ggtt->wq = alloc_workqueue("xe-ggtt-wq", 0, WQ_MEM_RECLAIM);
315+
if (!ggtt->wq)
316+
return -ENOMEM;
317+
315318
__xe_ggtt_init_early(ggtt, xe_wopcm_size(xe));
316319

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

0 commit comments

Comments
 (0)