Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 92ff71b8 authored by WANG Cong's avatar WANG Cong Committed by David S. Miller
Browse files

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 <davem@davemloft.net>
Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1b9d48f2
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -6503,11 +6503,6 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,

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;