Commit bd7081ae authored by Wu Fengguang's avatar Wu Fengguang Committed by Zhang Rui

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: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
parent 8c187693
......@@ -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;
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment