From: jsg Date: Thu, 12 Sep 2024 23:32:30 +0000 (+0000) Subject: drm/amdgpu: Fix smatch static checker warning X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=1f008d8586f68de3e2e9e58638d95572328aafe2;p=openbsd drm/amdgpu: Fix smatch static checker warning From Hawking Zhang 8bc7b3ce33e64c74211ed17aec823fc4e523426a in linux-6.6.y/6.6.51 bdbdc7cecd00305dc844a361f9883d3a21022027 in mainline linux --- diff --git a/sys/dev/pci/drm/amd/amdgpu/gfx_v11_0.c b/sys/dev/pci/drm/amd/amdgpu/gfx_v11_0.c index e617c288976..2fe7ed4f178 100644 --- a/sys/dev/pci/drm/amd/amdgpu/gfx_v11_0.c +++ b/sys/dev/pci/drm/amd/amdgpu/gfx_v11_0.c @@ -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)) {