summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/radeon_object.c
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2022-01-20 01:46:28 +0300
committerAlex Deucher <alexander.deucher@amd.com>2022-01-26 02:00:36 +0300
commitee2016b4b5bb70483e1c06218e7b6288704284cb (patch)
tree7b942741acf5fb0f484e103b697652aa94cca77a /drivers/gpu/drm/radeon/radeon_object.c
parent430e6a0212b2a0eb1de5e9d47a016fa79edf3978 (diff)
downloadlinux-ee2016b4b5bb70483e1c06218e7b6288704284cb.tar.xz
drm/radeon: remove redundant assignment to reg
The pointer reg is being assigned a value that is not read, the exit path via label 'out' never accesses it. The assignment is redundant and can be removed. Cleans up clang scan build warning: drivers/gpu/drm/radeon/radeon_object.c:570:3: warning: Value stored to 'reg' is never read [deadcode.DeadStores] Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_object.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_object.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c
index 56ede9d63b12..87536d205593 100644
--- a/drivers/gpu/drm/radeon/radeon_object.c
+++ b/drivers/gpu/drm/radeon/radeon_object.c
@@ -567,7 +567,6 @@ int radeon_bo_get_surface_reg(struct radeon_bo *bo)
return 0;
if (bo->surface_reg >= 0) {
- reg = &rdev->surface_regs[bo->surface_reg];
i = bo->surface_reg;
goto out;
}