Commit ccfc4392 authored by Tian Tao's avatar Tian Tao Committed by Alex Deucher

drm/radeon/r600: Fix variables that are not used after assignment

err was not used after being assigned -EINVAL and was given a new value,
so here add goto to handle the error case.
Signed-off-by: default avatarTian Tao <tiantao6@hisilicon.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 1f7cfaa3
...@@ -2569,6 +2569,7 @@ int r600_init_microcode(struct radeon_device *rdev) ...@@ -2569,6 +2569,7 @@ int r600_init_microcode(struct radeon_device *rdev)
pr_err("r600_cp: Bogus length %zu in firmware \"%s\"\n", pr_err("r600_cp: Bogus length %zu in firmware \"%s\"\n",
rdev->me_fw->size, fw_name); rdev->me_fw->size, fw_name);
err = -EINVAL; err = -EINVAL;
goto out;
} }
snprintf(fw_name, sizeof(fw_name), "radeon/%s_rlc.bin", rlc_chip_name); snprintf(fw_name, sizeof(fw_name), "radeon/%s_rlc.bin", rlc_chip_name);
...@@ -2579,6 +2580,7 @@ int r600_init_microcode(struct radeon_device *rdev) ...@@ -2579,6 +2580,7 @@ int r600_init_microcode(struct radeon_device *rdev)
pr_err("r600_rlc: Bogus length %zu in firmware \"%s\"\n", pr_err("r600_rlc: Bogus length %zu in firmware \"%s\"\n",
rdev->rlc_fw->size, fw_name); rdev->rlc_fw->size, fw_name);
err = -EINVAL; err = -EINVAL;
goto out;
} }
if ((rdev->family >= CHIP_RV770) && (rdev->family <= CHIP_HEMLOCK)) { if ((rdev->family >= CHIP_RV770) && (rdev->family <= CHIP_HEMLOCK)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment