thermal: tools: tmon: remove unneeded local variable
authorran jianping <ran.jianping@zte.com.cn>
Fri, 12 Nov 2021 09:09:46 +0000 (09:09 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 24 Nov 2021 16:26:13 +0000 (17:26 +0100)
Fix the following coccicheck review:
/tools/thermal/tmon/pid.c:57:5-8: Unneeded variable

Remove unneeded variable used to store return value.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ran jianping <ran.jianping@zte.com.cn>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
tools/thermal/tmon/pid.c

index c54edb4f630cffe8fa0896005761a1fdbcc19855..296f69c00c57ac26f2360e84fe95dabd575570a3 100644 (file)
@@ -54,7 +54,6 @@ static double xk_1, xk_2; /* input temperature x[k-#] */
  */
 int init_thermal_controller(void)
 {
-       int ret = 0;
 
        /* init pid params */
        p_param.ts = ticktime;
@@ -65,7 +64,7 @@ int init_thermal_controller(void)
 
        p_param.t_target = target_temp_user;
 
-       return ret;
+       return 0;
 }
 
 void controller_reset(void)