]> git.karo-electronics.de Git - linux-beck.git/commitdiff
at86rf230: fix simple_return.cocci warnings
authorFengguang Wu <fengguang.wu@intel.com>
Thu, 6 Nov 2014 07:31:57 +0000 (15:31 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 6 Nov 2014 15:30:05 +0000 (16:30 +0100)
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 <fengguang.wu@intel.com>
Acked-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/net/ieee802154/at86rf230.c

index a3cc7d9f28abf53e67e7be39c4b56c190b5c9296..ebcbeb3a06e833477b239d783108c5d79e6b9190 100644 (file)
@@ -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 *