netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: David Miller <davem@davemloft.net>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>,
	martin.varghese@nokia.com, Willem de Bruijn <willemb@google.com>
Subject: Re: [PATCH net] net: bareudp: add missing error handling for bareudp_link_config()
Date: Sat, 2 Jan 2021 15:49:54 -0800	[thread overview]
Message-ID: <CAM_iQpW1ZMyb33j4uLNMXXW+vQSS6FB1-BhxSQ7ZShi9dT2ZoQ@mail.gmail.com> (raw)
In-Reply-To: <20201231034417.1570553-1-kuba@kernel.org>

On Wed, Dec 30, 2020 at 7:46 PM Jakub Kicinski <kuba@kernel.org> wrote:
> @@ -661,9 +662,14 @@ static int bareudp_newlink(struct net *net, struct net_device *dev,
>
>         err = bareudp_link_config(dev, tb);
>         if (err)
> -               return err;
> +               goto err_unconfig;
>
>         return 0;
> +
> +err_unconfig:

I think we can save this goto.

> +       list_del(&bareudp->next);
> +       unregister_netdevice(dev);

Which is bareudp_dellink(dev, NULL). ;)

Thanks.

  reply	other threads:[~2021-01-02 23:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-31  3:44 [PATCH net] net: bareudp: add missing error handling for bareudp_link_config() Jakub Kicinski
2021-01-02 23:49 ` Cong Wang [this message]
2021-01-04 17:49   ` Jakub Kicinski
2021-01-05  6:22     ` Cong Wang

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=CAM_iQpW1ZMyb33j4uLNMXXW+vQSS6FB1-BhxSQ7ZShi9dT2ZoQ@mail.gmail.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=martin.varghese@nokia.com \
    --cc=netdev@vger.kernel.org \
    --cc=willemb@google.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).