drm/xe: Add a NULL check in xe_ttm_stolen_mgr_init
[ Upstream commit a6eff8f9c7e844cb24ccb188ca24abcd59734e74 ] 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 Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
a296815846
commit
cc796a7798
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user