drm/radeon/ci_dpm: Remove the unneeded result variable
authorye xingchen <ye.xingchen@zte.com.cn>
Fri, 2 Sep 2022 07:31:48 +0000 (07:31 +0000)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 13 Sep 2022 18:32:58 +0000 (14:32 -0400)
Return the value ci_load_smc_ucode() directly instead of storing it in
another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/ci_dpm.c

index ac006be..8ef25ab 100644 (file)
@@ -2056,7 +2056,7 @@ static void ci_clear_vc(struct radeon_device *rdev)
 static int ci_upload_firmware(struct radeon_device *rdev)
 {
        struct ci_power_info *pi = ci_get_pi(rdev);
-       int i, ret;
+       int i;
 
        for (i = 0; i < rdev->usec_timeout; i++) {
                if (RREG32_SMC(RCU_UC_EVENTS) & BOOT_SEQ_DONE)
@@ -2067,9 +2067,7 @@ static int ci_upload_firmware(struct radeon_device *rdev)
        ci_stop_smc_clock(rdev);
        ci_reset_smc(rdev);
 
-       ret = ci_load_smc_ucode(rdev, pi->sram_end);
-
-       return ret;
+       return ci_load_smc_ucode(rdev, pi->sram_end);
 
 }