Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Liang Li <liang.z.li@intel.com>
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Li, Liang Z and committed by
David S. Miller
905726c1 96ac5cc9

-7
-7
drivers/net/xen-netfront.c
··· 1245 1245 np = netdev_priv(netdev); 1246 1246 np->xbdev = dev; 1247 1247 1248 - /* No need to use rtnl_lock() before the call below as it 1249 - * happens before register_netdev(). 1250 - */ 1251 - netif_set_real_num_tx_queues(netdev, 0); 1252 1248 np->queues = NULL; 1253 1249 1254 1250 err = -ENOMEM; ··· 1896 1900 xennet_disconnect_backend(info); 1897 1901 kfree(info->queues); 1898 1902 info->queues = NULL; 1899 - rtnl_lock(); 1900 - netif_set_real_num_tx_queues(info->netdev, 0); 1901 - rtnl_unlock(); 1902 1903 out: 1903 1904 return err; 1904 1905 }