netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tc35815: fix iomap leak
@ 2010-07-10 10:03 Kulikov Vasiliy
  2010-07-13  3:33 ` David Miller
  2010-07-13 13:14 ` Atsushi Nemoto
  0 siblings, 2 replies; 4+ messages in thread
From: Kulikov Vasiliy @ 2010-07-10 10:03 UTC (permalink / raw)
  To: kernel-janitors
  Cc: David S. Miller, Atsushi Nemoto, Jiri Pirko, Eric Dumazet,
	Alexey Dobriyan, netdev

If tc35815_init_one() fails we must unmap mapped regions.

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

diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c
index be08b75..99afa5c 100644
--- a/drivers/net/tc35815.c
+++ b/drivers/net/tc35815.c
@@ -854,7 +854,7 @@ static int __devinit tc35815_init_one(struct pci_dev *pdev,
 
 	rc = register_netdev(dev);
 	if (rc)
-		goto err_out;
+		goto err_out_iounmap;
 
 	memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
 	printk(KERN_INFO "%s: %s at 0x%lx, %pM, IRQ %d\n",
@@ -872,6 +872,8 @@ static int __devinit tc35815_init_one(struct pci_dev *pdev,
 
 err_out_unregister:
 	unregister_netdev(dev);
+err_out_iounmap:
+	pcim_iounmap_regions(pdev, 1 << 1);
 err_out:
 	free_netdev(dev);
 	return rc;
-- 
1.7.0.4


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

end of thread, other threads:[~2010-07-13 21:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-10 10:03 [PATCH] tc35815: fix iomap leak Kulikov Vasiliy
2010-07-13  3:33 ` David Miller
2010-07-13 13:14 ` Atsushi Nemoto
2010-07-13 21:24   ` 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).