diff options
author | Kulikov Vasiliy <segooon@gmail.com> | 2010-07-23 02:44:44 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-23 16:05:12 -0400 |
commit | f89f5d0e94e001e0a09bd433c0c0f089eaf0dea9 (patch) | |
tree | ab6efd9e1c844c68e48b0cc40f972877874fa9f3 | |
parent | 451e07a26483f3234f1df6b1f60b949dab4e7719 (diff) |
net: 3c59x: fix leak of iomaps
If vortex_probe1() fails we should unmap ioaddr mapped earlier.
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/3c59x.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index 9b137e14dbb0..ebd4c19e30ae 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c | |||
@@ -1029,6 +1029,7 @@ static int __devinit vortex_init_one(struct pci_dev *pdev, | |||
1029 | rc = vortex_probe1(&pdev->dev, ioaddr, pdev->irq, | 1029 | rc = vortex_probe1(&pdev->dev, ioaddr, pdev->irq, |
1030 | ent->driver_data, unit); | 1030 | ent->driver_data, unit); |
1031 | if (rc < 0) { | 1031 | if (rc < 0) { |
1032 | pci_iounmap(pdev, ioaddr); | ||
1032 | pci_disable_device(pdev); | 1033 | pci_disable_device(pdev); |
1033 | goto out; | 1034 | goto out; |
1034 | } | 1035 | } |