summaryrefslogtreecommitdiffstats
path: root/drivers/thermal/intel_soc_dts_iosf.c
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2015-04-29 03:10:16 +0200
committerZhang Rui <rui.zhang@intel.com>2015-05-01 05:38:27 +0200
commitbd7081ae2bbd063fa4a29a01cb7004d8516e54e3 (patch)
treee5cfc9cab2de283910f5c58a22b3a032372f8289 /drivers/thermal/intel_soc_dts_iosf.c
parentthermal: intel Quark SoC X1000 DTS thermal driver (diff)
downloadlinux-bd7081ae2bbd063fa4a29a01cb7004d8516e54e3.tar.xz
linux-bd7081ae2bbd063fa4a29a01cb7004d8516e54e3.zip
Thermal: Intel SoC: fix simple_return.cocci warnings
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> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Diffstat (limited to 'drivers/thermal/intel_soc_dts_iosf.c')
-rw-r--r--drivers/thermal/intel_soc_dts_iosf.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/thermal/intel_soc_dts_iosf.c b/drivers/thermal/intel_soc_dts_iosf.c
index d89787612c5d..42e4b6ac3875 100644
--- 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_critical_trip(
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;
}
}
}