提交 92ff71b8 编写于 作者: W WANG Cong 提交者: David S. Miller

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: NCong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1b9d48f2
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册