From: Kulikov Vasiliy Date: Fri, 23 Jul 2010 06:44:44 +0000 (+0000) Subject: net: 3c59x: fix leak of iomaps X-Git-Tag: Ubuntu-5.2.0-15.16~24359^2~111 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=f89f5d0e94e001e0a09bd433c0c0f089eaf0dea9;p=mirror_ubuntu-eoan-kernel.git net: 3c59x: fix leak of iomaps If vortex_probe1() fails we should unmap ioaddr mapped earlier. Signed-off-by: Kulikov Vasiliy Signed-off-by: David S. Miller --- 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, 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; }