]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
xen-netfront: Remove the meaningless code
authorLi, Liang Z <liang.z.li@intel.com>
Fri, 26 Jun 2015 23:17:26 +0000 (07:17 +0800)
committerElena Ufimtseva <elena.ufimtseva@oracle.com>
Wed, 12 Aug 2015 11:58:33 +0000 (07:58 -0400)
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>
(cherry picked from commit 905726c1c5a3ca620ba7d73c78eddfb91de5ce28)
Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com>
drivers/net/xen-netfront.c

index b3e9491bc8ec81ccf55fa55dc5c0690259317555..f948c46d51329970c186b2886c267ffba2e807db 100644 (file)
@@ -1244,10 +1244,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;
@@ -1899,9 +1895,6 @@ abort_transaction_no_dev_fatal:
        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;
 }