netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wd: fix memory leak
@ 2010-07-13 11:23 Kulikov Vasiliy
  2010-07-15  0:53 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Kulikov Vasiliy @ 2010-07-13 11:23 UTC (permalink / raw)
  To: kernel-janitors; +Cc: David S. Miller, Joe Perches, netdev

Unmap mapped IO in wd_probe1() if register_netdev() failed.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
---
 drivers/net/wd.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wd.c b/drivers/net/wd.c
index 746a5ee..eb72c67 100644
--- a/drivers/net/wd.c
+++ b/drivers/net/wd.c
@@ -358,8 +358,10 @@ static int __init wd_probe1(struct net_device *dev, int ioaddr)
 #endif
 
 	err = register_netdev(dev);
-	if (err)
+	if (err) {
 		free_irq(dev->irq, dev);
+		iounmap(ei_status.mem);
+	}
 	return err;
 }
 
-- 
1.7.0.4


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

* Re: [PATCH] wd: fix memory leak
  2010-07-13 11:23 [PATCH] wd: fix memory leak Kulikov Vasiliy
@ 2010-07-15  0:53 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-07-15  0:53 UTC (permalink / raw)
  To: segooon; +Cc: kernel-janitors, joe, netdev

From: Kulikov Vasiliy <segooon@gmail.com>
Date: Tue, 13 Jul 2010 15:23:12 +0400

> Unmap mapped IO in wd_probe1() if register_netdev() failed.
> 
> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>

Applied.

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

end of thread, other threads:[~2010-07-15  0:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-13 11:23 [PATCH] wd: fix memory leak Kulikov Vasiliy
2010-07-15  0:53 ` 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).