From: Dan Carpenter Date: Wed, 14 Aug 2013 09:35:42 +0000 (+0300) Subject: rtnetlink: remove an unneeded test X-Git-Tag: upstream/snapshot3+hdmi~4422^2~293 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fce9b9be89cece975675142a3953bfb5299d195d;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Reviewed-by: "Eric W. Biederman" Signed-off-by: David S. Miller --- 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)