wd: fix memory leak
Unmap mapped IO in wd_probe1() if register_netdev() failed. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
8aa06af4d0
commit
bdb0f8672f
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue