]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
drm/amdgpu: remove redundant assignment to variable ret
authorColin Ian King <colin.king@canonical.com>
Tue, 12 May 2020 12:48:06 +0000 (13:48 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 14 May 2020 20:42:45 +0000 (16:42 -0400)
The variable ret is being initializeed with a value that is never read
and it is being updated later with a new value. The initialization
is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c

index 90610b4f2c75a570294625f6a03babb1ba5bd9b3..e9e59bc68c9f25d92c1f0e890aa52f4825129cb8 100644 (file)
@@ -441,7 +441,7 @@ out:
 
 int amdgpu_xgmi_update_topology(struct amdgpu_hive_info *hive, struct amdgpu_device *adev)
 {
-       int ret = -EINVAL;
+       int ret;
 
        /* Each psp need to set the latest topology */
        ret = psp_xgmi_set_topology_info(&adev->psp,