drm/amdgpu: Fix smatch static checker warning
authorjsg <jsg@openbsd.org>
Thu, 12 Sep 2024 23:32:30 +0000 (23:32 +0000)
committerjsg <jsg@openbsd.org>
Thu, 12 Sep 2024 23:32:30 +0000 (23:32 +0000)
From Hawking Zhang
8bc7b3ce33e64c74211ed17aec823fc4e523426a in linux-6.6.y/6.6.51
bdbdc7cecd00305dc844a361f9883d3a21022027 in mainline linux

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

index e617c28..2fe7ed4 100644 (file)
@@ -4269,11 +4269,11 @@ static int gfx_v11_0_hw_init(void *handle)
                        /* RLC autoload sequence 1: Program rlc ram */
                        if (adev->gfx.imu.funcs->program_rlc_ram)
                                adev->gfx.imu.funcs->program_rlc_ram(adev);
+                       /* rlc autoload firmware */
+                       r = gfx_v11_0_rlc_backdoor_autoload_enable(adev);
+                       if (r)
+                               return r;
                }
-               /* rlc autoload firmware */
-               r = gfx_v11_0_rlc_backdoor_autoload_enable(adev);
-               if (r)
-                       return r;
        } else {
                if (adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT) {
                        if (adev->gfx.imu.funcs && (amdgpu_dpm > 0)) {