From: Maarten Lankhorst Date: Wed, 6 Mar 2024 05:19:59 +0000 (-0800) Subject: drm/xe: Fix NULL check in xe_ggtt_init() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2a2e1107ef037bbeb29d7d78ae31825051fb174f;p=linux.git drm/xe: Fix NULL check in xe_ggtt_init() The null check for GT is after calling gt_to_xe, fix it. Fixes: 3121fed0c51b ("drm/xe: Cleanup some layering in GGTT") Cc: Matthew Brost Signed-off-by: Matthew Brost Signed-off-by: Maarten Lankhorst Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240306052002.311196-2-matthew.brost@intel.com --- diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c index 5e739513ab0aa..325337c38961f 100644 --- a/drivers/gpu/drm/xe/xe_ggtt.c +++ b/drivers/gpu/drm/xe/xe_ggtt.c @@ -251,7 +251,6 @@ err: static void ggtt_invalidate_gt_tlb(struct xe_gt *gt) { - struct xe_device *xe = gt_to_xe(gt); int err; if (!gt) @@ -259,7 +258,7 @@ static void ggtt_invalidate_gt_tlb(struct xe_gt *gt) err = xe_gt_tlb_invalidation_ggtt(gt); if (err) - drm_warn(&xe->drm, "xe_gt_tlb_invalidation_ggtt error=%d", err); + drm_warn(>_to_xe(gt)->drm, "xe_gt_tlb_invalidation_ggtt error=%d", err); } void xe_ggtt_invalidate(struct xe_ggtt *ggtt)