drm/amd: Fix an error handling mistake in psp_sw_init()
authorjsg <jsg@openbsd.org>
Fri, 4 Aug 2023 09:15:07 +0000 (09:15 +0000)
committerjsg <jsg@openbsd.org>
Fri, 4 Aug 2023 09:15:07 +0000 (09:15 +0000)
From Mario Limonciello
5c58d120bf81a1fe6cc05e640568c0da14042c09 in linux-6.1.y/6.1.43
c01aebeef3ce45f696ffa0a1303cea9b34babb45 in mainline linux

sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c

index f003bef..612c2cd 100644 (file)
@@ -472,11 +472,11 @@ static int psp_sw_init(void *handle)
        return 0;
 
 failed2:
-       amdgpu_bo_free_kernel(&psp->fw_pri_bo,
-                             &psp->fw_pri_mc_addr, &psp->fw_pri_buf);
-failed1:
        amdgpu_bo_free_kernel(&psp->fence_buf_bo,
                              &psp->fence_buf_mc_addr, &psp->fence_buf);
+failed1:
+       amdgpu_bo_free_kernel(&psp->fw_pri_bo,
+                             &psp->fw_pri_mc_addr, &psp->fw_pri_buf);
        return ret;
 }