[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130814093542.GC521@elgon.mountain>
Date: Wed, 14 Aug 2013 12:35:42 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: "David S. Miller" <davem@...emloft.net>
Cc: John Fastabend <john.r.fastabend@...el.com>,
Jiri Pirko <jiri@...nulli.us>,
Vlad Yasevich <vyasevic@...hat.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
netdev@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [patch] rtnetlink: remove an unneeded test
We know that "dev" is a valid pointer at this point, so we can remove
the test and clean up a little.
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 618dbe4..e7e058e 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -1867,10 +1867,10 @@ replay:
else
err = register_netdevice(dev);
- if (err < 0 && !IS_ERR(dev))
+ if (err < 0) {
free_netdev(dev);
- if (err < 0)
goto out;
+ }
err = rtnl_configure_link(dev, ifm);
if (err < 0)
--
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