[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150930134815.GA102781@lkp-ib03>
Date: Wed, 30 Sep 2015 21:48:15 +0800
From: kbuild test robot <lkp@...el.com>
To: Yuval Mintz <Yuval.Mintz@...gic.com>
Cc: kbuild-all@...org, netdev@...r.kernel.org, Ariel.Elior@...gic.com,
Yuval.Mintz@...gic.com,
Sudarsana Kalluru <Sudarsana.Kalluru@...gic.com>
Subject: [PATCH] qede: fix simple_return.cocci warnings
drivers/net/ethernet/qlogic/qede/qede_main.c:2141:1-3: WARNING: end returns can be simpified and declaration on line 2134 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: Sudarsana Kalluru <Sudarsana.Kalluru@...gic.com>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
---
qede_main.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
--- a/drivers/net/ethernet/qlogic/qede/qede_main.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_main.c
@@ -2131,18 +2131,13 @@ err0:
/* called with rtnl_lock */
static int qede_open(struct net_device *ndev)
{
- int rc;
struct qede_dev *edev = netdev_priv(ndev);
netif_carrier_off(ndev);
edev->ops->common->set_power_state(edev->cdev, PCI_D0);
- rc = qede_load(edev, QEDE_LOAD_NORMAL);
- if (rc)
- return rc;
-
- return 0;
+ return qede_load(edev, QEDE_LOAD_NORMAL);
}
static int qede_close(struct net_device *ndev)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists