Skip to content

Commit ccfc439

Browse files
Tian Taoalexdeucher
authored andcommitted
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: Tian Tao <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 1f7cfaa commit ccfc439

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/gpu/drm/radeon/r600.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2569,6 +2569,7 @@ int r600_init_microcode(struct radeon_device *rdev)
25692569
pr_err("r600_cp: Bogus length %zu in firmware \"%s\"\n",
25702570
rdev->me_fw->size, fw_name);
25712571
err = -EINVAL;
2572+
goto out;
25722573
}
25732574

25742575
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)
25792580
pr_err("r600_rlc: Bogus length %zu in firmware \"%s\"\n",
25802581
rdev->rlc_fw->size, fw_name);
25812582
err = -EINVAL;
2583+
goto out;
25822584
}
25832585

25842586
if ((rdev->family >= CHIP_RV770) && (rdev->family <= CHIP_HEMLOCK)) {

0 commit comments

Comments
 (0)