Skip to contentSkip to conversation

drm/amd/amdgpu: remove redundant assignment to variable res

PATCH New Colin King 1 participant 1 message Jun 29, 2019

Subsystems (4)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 drm/amd/amdgpu: remove redundant assignment to variable res

From: Colin Ian King <[email protected]>

Variable res is being initialized with a value that is never read and res is being re-assigned a little later on. The assignment is redundant and hence can be removed.

Addresses-Coverity: ("Unused value")

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
index df08ea172595..9b1bd8726fc2 100644
@@ -4527,7 +4527,7 @@ static int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,
 {
 	uint32_t formats[32];
 	int num_formats;
-	int res = -EPERM;
+	int res;
 
 	num_formats = get_plane_formats(plane, plane_cap, formats,
 					ARRAY_SIZE(formats));
Signature · 1 line
2.20.1