From: Shuicheng Lin <shuicheng.lin@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Shuicheng Lin <shuicheng.lin@intel.com>,
Raag Jadav <raag.jadav@intel.com>,
Matthew Brost <matthew.brost@intel.com>
Subject: [PATCH] drm/xe/lrc: Fix IS_ERR check on wrong pointer in xe_lrc_init()
Date: Thu, 5 Mar 2026 18:45:19 +0000 [thread overview]
Message-ID: <20260305184519.155060-1-shuicheng.lin@intel.com> (raw)
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
next reply other threads:[~2026-03-05 18:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-05 18:45 Shuicheng Lin [this message]
2026-03-05 18:49 ` [PATCH] drm/xe/lrc: Fix IS_ERR check on wrong pointer in xe_lrc_init() 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260305184519.155060-1-shuicheng.lin@intel.com \
--to=shuicheng.lin@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--cc=raag.jadav@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox