Unverified Commit cd87e596 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!11644 drm/amdgpu: fix dereference after null check

parents b7d644ed c08014a2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5235,7 +5235,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
	 * to put adev in the 1st position.
	 */
	INIT_LIST_HEAD(&device_list);
	if (!amdgpu_sriov_vf(adev) && (adev->gmc.xgmi.num_physical_nodes > 1)) {
	if (!amdgpu_sriov_vf(adev) && (adev->gmc.xgmi.num_physical_nodes > 1) && hive) {
		list_for_each_entry(tmp_adev, &hive->device_list, gmc.xgmi.head) {
			list_add_tail(&tmp_adev->reset_list, &device_list);
			if (gpu_reset_for_dev_remove && adev->shutdown)