diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-08-14 11:35:42 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-15 10:29:02 +0200 |
commit | fce9b9be89cece975675142a3953bfb5299d195d (patch) | |
tree | 286d437c1b3cbd0683eff139878cbd2cc70a3f83 | |
parent | Merge branch 'x-netns' (diff) | |
download | linux-fce9b9be89cece975675142a3953bfb5299d195d.tar.xz linux-fce9b9be89cece975675142a3953bfb5299d195d.zip |
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>
-rw-r--r-- | net/core/rtnetlink.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 0b2972c59b97..242084edb658 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) |