From: Kulikov Vasiliy Date: Thu, 15 Jul 2010 00:53:18 +0000 (-0700) Subject: wd: fix memory leak X-Git-Tag: MMI-PSA29.97-13-9~23092^2~227 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bdb0f8672ff6f601a32df5af40f11526b741985c;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git wd: fix memory leak Unmap mapped IO in wd_probe1() if register_netdev() failed. Signed-off-by: Kulikov Vasiliy Signed-off-by: David S. Miller --- diff --git a/drivers/net/wd.c b/drivers/net/wd.c index 746a5ee32f33..eb72c67699ab 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; }