Commit 7af12cba authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller
Browse files

net: rtnetlink: unify the code in __rtnl_newlink get dev with the rest



__rtnl_newlink() code flow is a bit different around tb[IFLA_IFNAME]
processing comparing to the other places. Change that to be unified with
the rest.

Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 88f4fb0c
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -3080,12 +3080,10 @@ replay:
	ifm = nlmsg_data(nlh);
	if (ifm->ifi_index > 0)
		dev = __dev_get_by_index(net, ifm->ifi_index);
	else {
		if (ifname[0])
	else if (tb[IFLA_IFNAME])
		dev = __dev_get_by_name(net, ifname);
	else
		dev = NULL;
	}

	if (dev) {
		master_dev = netdev_master_upper_dev_get(dev);