[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140424113827.6d27ec5b@nehalam.linuxnetplumber.net>
Date: Thu, 24 Apr 2014 11:38:27 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Toshiaki Makita <makita.toshiaki@....ntt.co.jp>
Cc: "David S. Miller" <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
bridge <bridge@...ts.linux-foundation.org>,
"C. R. Oldham" <cr@...tstack.com>, Tom Gundersen <teg@...m.no>
Subject: Re: [PATCH net] bridge: Handle IFLA_ADDRESS correctly when creating
bridge device
On Thu, 24 Apr 2014 21:16:27 +0900
Toshiaki Makita <makita.toshiaki@....ntt.co.jp> wrote:
> +static int br_dev_newlink(struct net *src_net, struct net_device *dev,
> + struct nlattr *tb[], struct nlattr *data[])
> +{
> + int err;
> + struct net_bridge *br = netdev_priv(dev);
> +
> + if (tb[IFLA_ADDRESS]) {
> + spin_lock_bh(&br->lock);
> + br_stp_change_bridge_id(br, nla_data(tb[IFLA_ADDRESS]));
> + spin_unlock_bh(&br->lock);
> + }
> +
> + err = register_netdevice(dev);
> + if (err)
> + return err;
> +
> + return 0;
> +}
Looks good.
Why not just do simpler tail call??
return register_netdevice(dev);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists