From: WANG Cong Date: Wed, 4 Jun 2014 00:11:54 +0000 (-0700) Subject: net: remove some unless free on failure in alloc_netdev_mqs() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=92ff71b8fe9cd9c673615fc6f3870af7376d7c84;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git net: remove some unless free on failure in alloc_netdev_mqs() When we jump to free_pcpu on failure in alloc_netdev_mqs() rx and tx queues are not yet allocated, so no need to free them. Cc: David S. Miller Signed-off-by: Cong Wang Signed-off-by: David S. Miller --- diff --git a/net/core/dev.c b/net/core/dev.c index 0355ca5d2924..1ba2cfe3f8e8 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -6503,11 +6503,6 @@ free_all: free_pcpu: free_percpu(dev->pcpu_refcnt); - netif_free_tx_queues(dev); -#ifdef CONFIG_SYSFS - kfree(dev->_rx); -#endif - free_dev: netdev_freemem(dev); return NULL;