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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 27 Dec 2014 07:07:48 +0800
From:	kbuild test robot <fengguang.wu@...el.com>
To:	Daniel Baluta <daniel.baluta@...el.com>
Cc:	kbuild-all@...org, Jonathan Cameron <jic23@...nel.org>,
	Hartmut Knaack <knaack.h@....de>,
	Lars-Peter Clausen <lars@...afoo.de>,
	Peter Meerwald <pmeerw@...erw.net>, linux-iio@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] iio: imu: kmx61: fix simple_return.cocci warnings

drivers/iio/imu/kmx61.c:543:1-4: WARNING: end returns can be simpified
drivers/iio/imu/kmx61.c:480:1-4: WARNING: end returns can be simpified if negative or 0 value

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

CC: Daniel Baluta <daniel.baluta@...el.com>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
---

 kmx61.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

--- a/drivers/iio/imu/kmx61.c
+++ b/drivers/iio/imu/kmx61.c
@@ -540,11 +540,7 @@ static int kmx61_setup_new_data_interrup
 		return ret;
 	}
 
-	ret = kmx61_set_mode(data, mode, KMX61_ACC | KMX61_MAG, true);
-	if (ret)
-		return ret;
-
-	return 0;
+	return kmx61_set_mode(data, mode, KMX61_ACC | KMX61_MAG, true);
 }
 
 /**
--
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