mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
drm/amdgpu: fix the waring dereferencing hive
[ Upstream commit 1940708ccf5aff76de4e0b399f99267c93a89193 ] Check the amdgpu_hive_info *hive that maybe is NULL. Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com> Reviewed-by: Tim Huang <Tim.Huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
1b73ea3d97
commit
01cd55b971
@@ -1297,6 +1297,9 @@ static void psp_xgmi_reflect_topology_info(struct psp_context *psp,
|
|||||||
uint8_t dst_num_links = node_info.num_links;
|
uint8_t dst_num_links = node_info.num_links;
|
||||||
|
|
||||||
hive = amdgpu_get_xgmi_hive(psp->adev);
|
hive = amdgpu_get_xgmi_hive(psp->adev);
|
||||||
|
if (WARN_ON(!hive))
|
||||||
|
return;
|
||||||
|
|
||||||
list_for_each_entry(mirror_adev, &hive->device_list, gmc.xgmi.head) {
|
list_for_each_entry(mirror_adev, &hive->device_list, gmc.xgmi.head) {
|
||||||
struct psp_xgmi_topology_info *mirror_top_info;
|
struct psp_xgmi_topology_info *mirror_top_info;
|
||||||
int j;
|
int j;
|
||||||
|
|||||||
Reference in New Issue
Block a user