cpufreq: tegra194: Remove the unneeded result variable
authorye xingchen <ye.xingchen@zte.com.cn>
Wed, 31 Aug 2022 03:32:13 +0000 (03:32 +0000)
committerViresh Kumar <viresh.kumar@linaro.org>
Thu, 1 Sep 2022 04:12:12 +0000 (09:42 +0530)
Return the value returned by smp_call_function_single() 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>
[ Viresh: Minor update to commit log ]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/tegra194-cpufreq.c

index 1216046cf4c2ee2dd1ff2965f673d9399c52300b..7e143c06972efe5546b85ec37889e2558a60fb7a 100644 (file)
@@ -314,11 +314,7 @@ static void tegra194_get_cpu_ndiv_sysreg(void *ndiv)
 
 static int tegra194_get_cpu_ndiv(u32 cpu, u32 cpuid, u32 clusterid, u64 *ndiv)
 {
-       int ret;
-
-       ret = smp_call_function_single(cpu, tegra194_get_cpu_ndiv_sysreg, &ndiv, true);
-
-       return ret;
+       return smp_call_function_single(cpu, tegra194_get_cpu_ndiv_sysreg, &ndiv, true);
 }
 
 static void tegra194_set_cpu_ndiv_sysreg(void *data)