projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c9cc3d6
)
drm/xe: Add a NULL check in xe_ttm_stolen_mgr_init
author
Nirmoy Das
<nirmoy.das@intel.com>
Tue, 19 Mar 2024 13:09:25 +0000
(14:09 +0100)
committer
Matthew Auld
<matthew.auld@intel.com>
Wed, 20 Mar 2024 08:58:01 +0000
(08:58 +0000)
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>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Link:
https://patchwork.freedesktop.org/patch/msgid/20240319130925.22399-1-nirmoy.das@intel.com
drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c
b/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c
index 3107d2a12426ca42ffb824e3de6f92d57edec0da..fb35e46d68b4982de2483dbf6b86bcb6698d2972 100644
(file)
--- 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))