From: Alex Deucher Date: Wed, 26 Apr 2023 18:42:53 +0000 (-0400) Subject: drm/amdgpu/gfx11: drop unused variable X-Git-Tag: v6.5-rc1~153^2~7^2~683 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b848fe65f856193fc4f567c84f559f60ff66a3db;p=thirdparty%2Fkernel%2Flinux.git drm/amdgpu/gfx11: drop unused variable Just check the return value directly. Reviewed-by: Christian König Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c index d36d365cb5825..256014a8c8248 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c @@ -4373,7 +4373,6 @@ static int gfx_v11_0_hw_init(void *handle) static int gfx_v11_0_hw_fini(void *handle) { struct amdgpu_device *adev = (struct amdgpu_device *)handle; - int r; amdgpu_irq_put(adev, &adev->gfx.cp_ecc_error_irq, 0); amdgpu_irq_put(adev, &adev->gfx.priv_reg_irq, 0); @@ -4381,8 +4380,7 @@ static int gfx_v11_0_hw_fini(void *handle) if (!adev->no_hw_access) { if (amdgpu_async_gfx_ring) { - r = amdgpu_gfx_disable_kgq(adev, 0); - if (r) + if (amdgpu_gfx_disable_kgq(adev, 0)) DRM_ERROR("KGQ disable failed\n"); }