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 <mc...@broadcom.com>
Signed-off-by: Fengguang Wu <fengguang...@intel.com>
---

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

--- 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)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to