diff options
author | Kulikov Vasiliy <segooon@gmail.com> | 2010-07-10 02:03:18 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-13 05:21:42 +0200 |
commit | b31fb86815153be3bc94e8ffb9dbf6e9d7694b2d (patch) | |
tree | a7bf4a424cc2aa2d620aaa4fb51c94a3b3b230e2 /drivers/net/tc35815.c | |
parent | ll_temac: Fix missing validate_addr hook (diff) | |
download | linux-b31fb86815153be3bc94e8ffb9dbf6e9d7694b2d.tar.xz linux-b31fb86815153be3bc94e8ffb9dbf6e9d7694b2d.zip |
tc35815: fix iomap leak
If tc35815_init_one() fails we must unmap mapped regions.
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tc35815.c')
-rw-r--r-- | 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 be08b75dbc15..99afa5c47bec 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; |