at86rf230: fix simple_return.cocci warnings

Author: Fengguang Wu <fengguang.wu@intel.com>

drivers/net/ieee802154/at86rf230.c:1365:1-3: 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

Signed-off-by: Fengguang Wu 
Acked-by: Alexander Aring 
Signed-off-by: Marcel Holtmann 
---
 drivers/net/ieee802154/at86rf230.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
 
diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c
index a3cc7d9..ebcbeb3 100644
--- a/drivers/net/ieee802154/at86rf230.c
+++ b/drivers/net/ieee802154/at86rf230.c
@@ -1362,11 +1362,7 @@ static int at86rf230_hw_init(struct at86rf230_local *lp)
 	 * sets this bit and I don't know why. We set this always force
 	 * to zero while probing.
 	 */
-	rc = at86rf230_write_subreg(lp, SR_SLOTTED_OPERATION, 0);
-	if (rc)
-		return rc;
-
-	return 0;
+	return at86rf230_write_subreg(lp, SR_SLOTTED_OPERATION, 0);
 }
 
 static struct at86rf230_platform_data *
BtrLinux
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.