From: ebiederm@xmission.com (Eric W. Biederman)
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: "David S. Miller" <davem@davemloft.net>,
John Fastabend <john.r.fastabend@intel.com>,
Jiri Pirko <jiri@resnulli.us>,
Vlad Yasevich <vyasevic@redhat.com>,
netdev@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] rtnetlink: remove an unneeded test
Date: Wed, 14 Aug 2013 12:35:24 -0700 [thread overview]
Message-ID: <8761v8aww3.fsf@xmission.com> (raw)
In-Reply-To: <20130814093542.GC521@elgon.mountain> (Dan Carpenter's message of "Wed, 14 Aug 2013 12:35:42 +0300")
Dan Carpenter <dan.carpenter@oracle.com> writes:
> We know that "dev" is a valid pointer at this point, so we can remove
> the test and clean up a little.
Quite right.
Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com>
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.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)
next prev parent reply other threads:[~2013-08-14 19:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-14 9:35 [patch] rtnetlink: remove an unneeded test Dan Carpenter
2013-08-14 19:35 ` Eric W. Biederman [this message]
2013-08-15 8:29 ` David Miller
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=8761v8aww3.fsf@xmission.com \
--to=ebiederm@xmission.com \
--cc=dan.carpenter@oracle.com \
--cc=davem@davemloft.net \
--cc=jiri@resnulli.us \
--cc=john.r.fastabend@intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vyasevic@redhat.com \
/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).