netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch net-next] net: remove some unless free on failure in alloc_netdev_mqs()
@ 2014-06-04  0:11 Cong Wang
  2014-06-04  0:11 ` [Patch net-next] net: remove some useless list_del() Cong Wang
  2014-06-04  2:19 ` [Patch net-next] net: remove some unless free on failure in alloc_netdev_mqs() David Miller
  0 siblings, 2 replies; 15+ messages in thread
From: Cong Wang @ 2014-06-04  0:11 UTC (permalink / raw)
  To: netdev; +Cc: Cong Wang, David S. Miller

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: Cong Wang <xiyou.wangcong@gmail.com>
---
 net/core/dev.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 0355ca5..1ba2cfe 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;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2014-06-09  5:58 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-04  0:11 [Patch net-next] net: remove some unless free on failure in alloc_netdev_mqs() Cong Wang
2014-06-04  0:11 ` [Patch net-next] net: remove some useless list_del() Cong Wang
2014-06-04  0:24   ` David Miller
2014-06-04  0:43   ` Eric Dumazet
2014-06-04  2:18     ` Alexei Starovoitov
2014-06-04  8:26       ` Daniel Borkmann
2014-06-06  6:40     ` Cong Wang
2014-06-06 13:17       ` Eric Dumazet
2014-06-06 13:44         ` [PATCH net-next] net: force a list_del() in unregister_netdevice_many() Eric Dumazet
2014-06-06 15:54           ` Alexei Starovoitov
2014-06-08 21:15           ` David Miller
2014-06-09  1:27           ` Gao feng
2014-06-09  5:48             ` Eric Dumazet
2014-06-09  5:58         ` [Patch net-next] net: remove some useless list_del() Cong Wang
2014-06-04  2:19 ` [Patch net-next] net: remove some unless free on failure in alloc_netdev_mqs() David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).