Skip to content

Commit

Permalink
drm/amdgpu: remove redundant assignment to variable ret
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Colin Ian King authored and Alex Deucher committed May 14, 2020
1 parent 72d99b3 commit 29c1ec2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ int amdgpu_xgmi_set_pstate(struct amdgpu_device *adev, int pstate)

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,
Expand Down

0 comments on commit 29c1ec2

Please sign in to comment.