drm/amdgpu: Fix smatch static checker warning
Subsystems (2)
PATCH 1/1 drm/amdgpu: Fix smatch static checker warning
adev->gfx.imu.funcs could be NULL
Signed-off-by Hawking Zhang <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +4 -4
@@ -4498,11 +4498,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 )) {
Signature · 1 line
2.17.1
[AMD Official Use Only - AMD Internal Distribution Only]
This patch was
Reviewed-by Likun Gao <[email protected]>.
Regards,
Likun
-----Original Message-----
From: Hawking Zhang <[email protected]>
Sent: Friday, June 21, 2024 5:54 PM
To: [email protected]; Gao, Likun <[email protected]>; Min, Frank <[email protected]>
Cc: Zhang, Hawking <[email protected]>
Subject: [PATCH] drm/amdgpu: Fix smatch static checker warning
adev->gfx.imu.funcs could be NULL
Signed-off-by Hawking Zhang <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +4 -4
@@ -4498,11 +4498,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 )) {
--
2.17.1