netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Denis Kirjanov <kda@linux-powerpc.org>
To: davem@davemloft.net, netdev@vger.kernel.org
Cc: Denis Kirjanov <kda@linux-powerpc.org>
Subject: [PATCH net-next] net: remove useless if check from register_netdevice()
Date: Wed, 12 Feb 2014 11:45:52 +0400	[thread overview]
Message-ID: <1392191152-24182-1-git-send-email-kda@linux-powerpc.org> (raw)

remove useless if check from register_netdevice()

Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
---
 net/core/dev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 4ad1b78..4be9a37 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5876,8 +5876,7 @@ int register_netdevice(struct net_device *dev)
 	if (dev->netdev_ops->ndo_init) {
 		ret = dev->netdev_ops->ndo_init(dev);
 		if (ret) {
-			if (ret > 0)
-				ret = -EIO;
+            ret = -EIO;
 			goto out;
 		}
 	}
-- 
1.8.3.2

             reply	other threads:[~2014-02-12  7:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-12  7:45 Denis Kirjanov [this message]
2014-02-12  8:20 ` [PATCH net-next] net: remove useless if check from register_netdevice() Ding Tianhong
2014-02-12  8:24 ` Ding Tianhong
2014-02-12  8:47   ` Denis Kirjanov
2014-02-12 14:46 ` David Miller
2014-02-12 14:51   ` Denis Kirjanov

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=1392191152-24182-1-git-send-email-kda@linux-powerpc.org \
    --to=kda@linux-powerpc.org \
    --cc=davem@davemloft.net \
    --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).