Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe/lrc: Fix IS_ERR check on wrong pointer in xe_lrc_init()
@ 2026-03-05 18:45 Shuicheng Lin
  2026-03-05 18:49 ` Matthew Brost
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Shuicheng Lin @ 2026-03-05 18:45 UTC (permalink / raw)
  To: intel-xe; +Cc: Shuicheng Lin, Raag Jadav, Matthew Brost

The result of xe_bo_create_pin_map_novm() is stored in local variable
'bo', but the error check mistakenly used IS_ERR(lrc->bo) instead of
IS_ERR(bo).
Fix by checking and dereferencing 'bo' directly.

Fixes: 89340099c6a4 ("drm/xe/lrc: Refactor context init into xe_lrc_ctx_init()")
Cc: Raag Jadav <raag.jadav@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
---
 drivers/gpu/drm/xe/xe_lrc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_lrc.c b/drivers/gpu/drm/xe/xe_lrc.c
index ebab5d78f7cc..4ac566d4234d 100644
--- a/drivers/gpu/drm/xe/xe_lrc.c
+++ b/drivers/gpu/drm/xe/xe_lrc.c
@@ -1598,8 +1598,8 @@ static int xe_lrc_init(struct xe_lrc *lrc, struct xe_hw_engine *hwe, struct xe_v
 	bo = xe_bo_create_pin_map_novm(xe, tile, bo_size,
 				       ttm_bo_type_kernel,
 				       bo_flags, false);
-	if (IS_ERR(lrc->bo))
-		return PTR_ERR(lrc->bo);
+	if (IS_ERR(bo))
+		return PTR_ERR(bo);
 
 	lrc->bo = bo;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-03-07 18:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-05 18:45 [PATCH] drm/xe/lrc: Fix IS_ERR check on wrong pointer in xe_lrc_init() Shuicheng Lin
2026-03-05 18:49 ` Matthew Brost
2026-03-06  4:49 ` Raag Jadav
2026-03-06 16:22 ` ✓ CI.KUnit: success for " Patchwork
2026-03-06 17:17 ` ✓ Xe.CI.BAT: " Patchwork
2026-03-07 18:42 ` ✗ Xe.CI.FULL: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox