aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-08-14 12:35:42 +0300
committerDavid S. Miller <davem@davemloft.net>2013-08-15 01:29:02 -0700
commitfce9b9be89cece975675142a3953bfb5299d195d (patch)
tree286d437c1b3cbd0683eff139878cbd2cc70a3f83 /net/core
parentf36f092065415b75b6be8377ae648c7114e7f099 (diff)
downloadkernel_goldelico_gta04-fce9b9be89cece975675142a3953bfb5299d195d.zip
kernel_goldelico_gta04-fce9b9be89cece975675142a3953bfb5299d195d.tar.gz
kernel_goldelico_gta04-fce9b9be89cece975675142a3953bfb5299d195d.tar.bz2
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@oracle.com> Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/rtnetlink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 0b2972c..242084e 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)