lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Wed, 29 Apr 2015 09:10:16 +0800
From:	kbuild test robot <fengguang.wu@...el.com>
To:	Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
Cc:	kbuild-all@...org, Zhang Rui <rui.zhang@...el.com>,
	Eduardo Valentin <edubezval@...il.com>,
	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] 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@...ux.intel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.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;
 			}
 		}
 	}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ