diff mbox

bnxt_en: fix simple_return.cocci warnings

Message ID 20151010122422.GA58821@ivytown2
State RFC, archived
Delegated to: David Miller
Headers show

Commit Message

kernel test robot Oct. 10, 2015, 12:24 p.m. UTC
drivers/net/ethernet/broadcom/bnxt/bnxt.c:4071:1-3: WARNING: end returns can be simpified and declaration on line 4064 can be dropped

 Simplify a trivial if-return sequence.  Possibly combine with a
 preceding function call.

Generated by: scripts/coccinelle/misc/simple_return.cocci

CC: Michael Chan <mchan@broadcom.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 bnxt.c |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -4061,18 +4061,12 @@  static int bnxt_shutdown_nic(struct bnxt
 
 static int bnxt_init_nic(struct bnxt *bp, bool irq_re_init)
 {
-	int rc;
-
 	bnxt_init_rx_rings(bp);
 	bnxt_init_tx_rings(bp);
 	bnxt_init_ring_grps(bp, irq_re_init);
 	bnxt_init_vnics(bp);
 
-	rc = bnxt_init_chip(bp, irq_re_init);
-	if (rc)
-		return rc;
-
-	return 0;
+	return bnxt_init_chip(bp, irq_re_init);
 }
 
 static void bnxt_disable_int(struct bnxt *bp)