From: Kulikov Vasiliy <segooon@gmail.com>
To: kernel-janitors@vger.kernel.org
Cc: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <eric.dumazet@gmail.com>,
Ben Hutchings <ben@decadent.org.uk>,
Alexey Dobriyan <adobriyan@gmail.com>,
Joe Perches <joe@perches.com>,
netdev@vger.kernel.org
Subject: [PATCH] net: 3c59x: fix leak of iomaps
Date: Fri, 23 Jul 2010 20:44:44 +0400 [thread overview]
Message-ID: <1279903485-28247-1-git-send-email-segooon@gmail.com> (raw)
If vortex_probe1() fails we should unmap ioaddr mapped earlier.
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
---
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 9b137e1..ebd4c19 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;
}
--
1.7.0.4
next reply other threads:[~2010-07-23 16:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-23 16:44 Kulikov Vasiliy [this message]
2010-07-23 20:06 ` [PATCH] net: 3c59x: fix leak of iomaps David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1279903485-28247-1-git-send-email-segooon@gmail.com \
--to=segooon@gmail.com \
--cc=adobriyan@gmail.com \
--cc=ben@decadent.org.uk \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=joe@perches.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=klassert@mathematik.tu-chemnitz.de \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).