[Intel-wired-lan] [PATCH] ixgbe: fix simple_return.cocci warnings

kbuild test robot fengguang.wu at intel.com
Wed Jul 29 07:11:25 UTC 2015


drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c:153:1-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: Mark Rustad <mark.d.rustad at intel.com>
Signed-off-by: Fengguang Wu <fengguang.wu at intel.com>
---

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

--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
@@ -150,12 +150,8 @@ static s32 ixgbe_get_cs4227_status(struc
 	if (status)
 		return status;
 
-	status = ixgbe_check_cs4227_reg(hw, IXGBE_CS4227_HOST_SPARE24_LSB +
+	return ixgbe_check_cs4227_reg(hw, IXGBE_CS4227_HOST_SPARE24_LSB +
 					(1 << 12));
-	if (status)
-		return status;
-
-	return 0;
 }
 
 /**


More information about the Intel-wired-lan mailing list