aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
diff options
context:
space:
mode:
authorchiminghao <chi.minghao@zte.com.cn>2021-12-09 01:58:23 +0000
committerAlex Deucher <alexander.deucher@amd.com>2021-12-13 16:34:27 -0500
commit47d9c6faa79e85a6e196e02cc74c4775d39546a0 (patch)
treeb9526d04e720b798a37bf21db79fbe210b352886 /drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
parentDocumentation/gpu: split amdgpu/index for readability (diff)
downloadlinux-dev-47d9c6faa79e85a6e196e02cc74c4775d39546a0.tar.xz
linux-dev-47d9c6faa79e85a6e196e02cc74c4775d39546a0.zip
drm:amdgpu:remove unneeded variable
return value form directly instead of taking this in another redundant variable. Reported-by: Zeal Robot <zealci@zte.com.cm> Signed-off-by: chiminghao <chi.minghao@zte.com.cn> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 9684d867199e..db2ec84f7237 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -1745,7 +1745,7 @@ static int gmc_v9_0_hw_init(void *handle)
{
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
bool value;
- int r, i;
+ int i;
/* The sequence of these two function calls matters.*/
gmc_v9_0_init_golden_registers(adev);
@@ -1780,9 +1780,7 @@ static int gmc_v9_0_hw_init(void *handle)
if (adev->umc.funcs && adev->umc.funcs->init_registers)
adev->umc.funcs->init_registers(adev);
- r = gmc_v9_0_gart_enable(adev);
-
- return r;
+ return gmc_v9_0_gart_enable(adev);
}
/**