netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Yuval Mintz <Yuval.Mintz@qlogic.com>
Cc: kbuild-all@01.org, netdev@vger.kernel.org,
	Ariel.Elior@qlogic.com, Yuval.Mintz@qlogic.com,
	Sudarsana Kalluru <Sudarsana.Kalluru@qlogic.com>
Subject: [PATCH] qede: fix simple_return.cocci warnings
Date: Wed, 30 Sep 2015 21:48:15 +0800	[thread overview]
Message-ID: <20150930134815.GA102781@lkp-ib03> (raw)
In-Reply-To: <1443618217-18069-6-git-send-email-Yuval.Mintz@qlogic.com>

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@qlogic.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.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)

  parent reply	other threads:[~2015-09-30 13:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-30 13:03 [RFC v3 net-next 00/10] Add new drivers: qed & qede Yuval Mintz
2015-09-30 13:03 ` [RFC v3 net-next 01/10] qed: Add module with basic common support Yuval Mintz
2015-09-30 13:33   ` [PATCH] qed: fix simple_return.cocci warnings kbuild test robot
2015-09-30 13:33   ` [PATCH] qed: fix kzalloc-simple.cocci warnings kbuild test robot
2015-09-30 13:50   ` [RFC v3 net-next 01/10] qed: Add module with basic common support kbuild test robot
2015-09-30 13:54   ` kbuild test robot
2015-09-30 13:03 ` [RFC v3 net-next 02/10] qed: Add basic L2 interface Yuval Mintz
2015-09-30 13:03 ` [RFC v3 net-next 03/10] qede: Add basic Network driver Yuval Mintz
2015-09-30 13:03 ` [RFC v3 net-next 04/10] qed: Add slowpath L2 support Yuval Mintz
2015-09-30 13:40   ` kbuild test robot
2015-09-30 13:59   ` kbuild test robot
2015-09-30 13:03 ` [RFC v3 net-next 05/10] qede: Add basic network device support Yuval Mintz
2015-09-30 13:48   ` kbuild test robot
2015-09-30 13:48   ` kbuild test robot [this message]
2015-09-30 13:03 ` [RFC v3 net-next 06/10] qede: classification configuration Yuval Mintz
2015-09-30 13:03 ` [RFC v3 net-next 07/10] qed: Add link support Yuval Mintz
2015-09-30 14:08   ` kbuild test robot
2015-09-30 13:03 ` [RFC v3 net-next 08/10] qede: Add support for link Yuval Mintz
2015-09-30 13:03 ` [RFC v3 net-next 09/10] qed: Add statistics support Yuval Mintz
2015-09-30 14:18   ` kbuild test robot
2015-09-30 14:23   ` kbuild test robot
2015-09-30 13:03 ` [RFC v3 net-next 10/10] qede: Add basic ethtool support Yuval Mintz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150930134815.GA102781@lkp-ib03 \
    --to=lkp@intel.com \
    --cc=Ariel.Elior@qlogic.com \
    --cc=Sudarsana.Kalluru@qlogic.com \
    --cc=Yuval.Mintz@qlogic.com \
    --cc=kbuild-all@01.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).