From: Colin Ian King Date: Tue, 12 May 2020 12:48:06 +0000 (+0100) Subject: drm/amdgpu: remove redundant assignment to variable ret X-Git-Tag: baikal/mips/sdk5.9~13559^2~8^2~11 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=23dc94ed41843aa6b70d3e151aa59ad42ef06c05;p=kernel.git drm/amdgpu: remove redundant assignment to variable ret 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 Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c index 90610b4f2c75a..e9e59bc68c9f2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c @@ -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,