提交 905726c1 编写于 作者: L Li, Liang Z 提交者: David S. Miller

xen-netfront: Remove the meaningless code

The function netif_set_real_num_tx_queues() will return -EINVAL if
the second parameter < 1, so call this function with the second
parameter set to 0 is meaningless.
Signed-off-by: NLiang Li <liang.z.li@intel.com>
Reviewed-by: NDavid Vrabel <david.vrabel@citrix.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 96ac5cc9
......@@ -1245,10 +1245,6 @@ static struct net_device *xennet_create_dev(struct xenbus_device *dev)
np = netdev_priv(netdev);
np->xbdev = dev;
/* No need to use rtnl_lock() before the call below as it
* happens before register_netdev().
*/
netif_set_real_num_tx_queues(netdev, 0);
np->queues = NULL;
err = -ENOMEM;
......@@ -1900,9 +1896,6 @@ static int talk_to_netback(struct xenbus_device *dev,
xennet_disconnect_backend(info);
kfree(info->queues);
info->queues = NULL;
rtnl_lock();
netif_set_real_num_tx_queues(info->netdev, 0);
rtnl_unlock();
out:
return err;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册