linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Thermal: Intel SoC: fix simple_return.cocci warnings
       [not found] <201504290914.FLUcG2uJ%fengguang.wu@intel.com>
@ 2015-04-29  1:10 ` kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2015-04-29  1:10 UTC (permalink / raw)
  To: Srinivas Pandruvada
  Cc: kbuild-all, Zhang Rui, Eduardo Valentin, linux-pm, linux-kernel

drivers/thermal/intel_soc_dts_iosf.c:358:4-7: WARNING: end returns can be simpified

 Simplify a trivial if-return sequence.  Possibly combine with a
 preceding function call.
Generated by: scripts/coccinelle/misc/simple_return.cocci

CC: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 intel_soc_dts_iosf.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

--- a/drivers/thermal/intel_soc_dts_iosf.c
+++ b/drivers/thermal/intel_soc_dts_iosf.c
@@ -350,18 +350,13 @@ int intel_soc_dts_iosf_add_read_only_cri
 	struct intel_soc_dts_sensors *sensors, int critical_offset)
 {
 	int i, j;
-	int ret;
 
 	for (i = 0; i < SOC_MAX_DTS_SENSORS; ++i) {
 		for (j = 0; j < sensors->soc_dts[i].trip_count; ++j) {
 			if (!(sensors->soc_dts[i].trip_mask & BIT(j))) {
-				ret = update_trip_temp(&sensors->soc_dts[i], j,
+				return update_trip_temp(&sensors->soc_dts[i], j,
 					sensors->tj_max - critical_offset,
 					THERMAL_TRIP_CRITICAL);
-				if (ret)
-					return ret;
-
-				return 0;
 			}
 		}
 	}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-04-29  1:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <201504290914.FLUcG2uJ%fengguang.wu@intel.com>
2015-04-29  1:10 ` [PATCH] Thermal: Intel SoC: fix simple_return.cocci warnings kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).