[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170408093244.593a8624@plumbers-lap.home.lan>
Date: Sat, 8 Apr 2017 09:32:44 -0400
From: Stephen Hemminger <stephen@...workplumber.org>
To: <idosch@...lanox.com>
Cc: <netdev@...r.kernel.org>, <davem@...emloft.net>,
<bridge@...ts.linux-foundation.org>, <peter@...nota.eu>,
<cera@...a.cz>, <mlxsw@...lanox.com>, <nikolay@...ulusnetworks.com>
Subject: Re: [PATCH net v2 2/2] bridge: netlink: register netdevice before
executing changelink
On Sat, 8 Apr 2017 14:41:59 +0300
<idosch@...lanox.com> wrote:
> + err = br_changelink(dev, tb, data);
> + if (err)
> + goto unregister;
> +
> + return 0;
> +
> +unregister:
> + unregister_netdevice(dev);
> + return err;
> }
Why use a goto? just do:
err = br_changelink(dev, tb, data);
if (err)
unregister_netdevice(dev)
return err;
}
The goto looks ugly
Powered by blists - more mailing lists