diff options
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/rtnetlink.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 545a969672ab..4a0d8cfff2a0 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -1640,14 +1640,14 @@ struct net_device *rtnl_create_link(struct net *src_net, struct net *net, | |||
1640 | int err; | 1640 | int err; |
1641 | struct net_device *dev; | 1641 | struct net_device *dev; |
1642 | unsigned int num_queues = 1; | 1642 | unsigned int num_queues = 1; |
1643 | unsigned int real_num_queues = 1; | ||
1644 | 1643 | ||
1645 | if (ops->get_tx_queues) { | 1644 | if (ops->get_tx_queues) { |
1646 | err = ops->get_tx_queues(src_net, tb, &num_queues, | 1645 | err = ops->get_tx_queues(src_net, tb); |
1647 | &real_num_queues); | 1646 | if (err < 0) |
1648 | if (err) | ||
1649 | goto err; | 1647 | goto err; |
1648 | num_queues = err; | ||
1650 | } | 1649 | } |
1650 | |||
1651 | err = -ENOMEM; | 1651 | err = -ENOMEM; |
1652 | dev = alloc_netdev_mq(ops->priv_size, ifname, ops->setup, num_queues); | 1652 | dev = alloc_netdev_mq(ops->priv_size, ifname, ops->setup, num_queues); |
1653 | if (!dev) | 1653 | if (!dev) |