net: 3c59x: fix leak of iomaps
authorKulikov Vasiliy <segooon@gmail.com>
Fri, 23 Jul 2010 06:44:44 +0000 (06:44 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Jul 2010 20:05:12 +0000 (13:05 -0700)
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>
drivers/net/3c59x.c

index 9b137e1..ebd4c19 100644 (file)
@@ -1029,6 +1029,7 @@ static int __devinit vortex_init_one(struct pci_dev *pdev,
        rc = vortex_probe1(&pdev->dev, ioaddr, pdev->irq,
                           ent->driver_data, unit);
        if (rc < 0) {
+               pci_iounmap(pdev, ioaddr);
                pci_disable_device(pdev);
                goto out;
        }