From: Nirmoy Das <nirmoy.das@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Nirmoy Das <nirmoy.das@intel.com>, Matthew Auld <matthew.auld@intel.com>
Subject: [PATCH] drm/xe: Add a NULL check in xe_ttm_stolen_mgr_init
Date: Tue, 19 Mar 2024 14:09:25 +0100 [thread overview]
Message-ID: <20240319130925.22399-1-nirmoy.das@intel.com> (raw)
Add an explicit check to ensure that the mgr is not NULL.
Cc: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
---
drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c b/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c
index 3107d2a12426..fb35e46d68b4 100644
--- a/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c
+++ b/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c
@@ -207,6 +207,11 @@ void xe_ttm_stolen_mgr_init(struct xe_device *xe)
u64 stolen_size, io_size, pgsize;
int err;
+ if (!mgr) {
+ drm_dbg_kms(&xe->drm, "Stolen mgr init failed\n");
+ return;
+ }
+
if (IS_SRIOV_VF(xe))
stolen_size = 0;
else if (IS_DGFX(xe))
--
2.42.0
next reply other threads:[~2024-03-19 13:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-19 13:09 Nirmoy Das [this message]
2024-03-19 13:42 ` [PATCH] drm/xe: Add a NULL check in xe_ttm_stolen_mgr_init Matthew Auld
2024-03-19 13:59 ` ✓ CI.Patch_applied: success for " Patchwork
2024-03-19 14:00 ` ✓ CI.checkpatch: " Patchwork
2024-03-19 14:00 ` ✓ CI.KUnit: " Patchwork
2024-03-19 14:11 ` ✓ CI.Build: " Patchwork
2024-03-19 14:14 ` ✓ CI.Hooks: " Patchwork
2024-03-19 14:15 ` ✓ CI.checksparse: " Patchwork
2024-03-19 14:36 ` ✓ CI.BAT: " 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=20240319130925.22399-1-nirmoy.das@intel.com \
--to=nirmoy.das@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.auld@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