From: akpm@osdl.org
To: James.Bottomley@steeleye.com
Cc: linux-scsi@vger.kernel.org, akpm@osdl.org, amol@verismonetworks.com
Subject: [patch 20/36] ioremap balanced with iounmap for drivers/scsi/nsp32.c
Date: Tue, 10 Oct 2006 14:41:37 -0700 [thread overview]
Message-ID: <200610102141.k9ALfbbF025420@shell0.pdx.osdl.net> (raw)
From: Amol Lad <amol@verismonetworks.com>
ioremap must be balanced by an iounmap and failing to do so can result in a
memory leak.
Signed-off-by: Amol Lad <amol@verismonetworks.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
drivers/scsi/nsp32.c | 5 +++++
1 files changed, 5 insertions(+)
diff -puN drivers/scsi/nsp32.c~ioremap-balanced-with-iounmap-drivers-scsi-nsp32c drivers/scsi/nsp32.c
--- a/drivers/scsi/nsp32.c~ioremap-balanced-with-iounmap-drivers-scsi-nsp32c
+++ a/drivers/scsi/nsp32.c
@@ -3540,6 +3540,11 @@ static int __devinit nsp32_probe(struct
nsp32_dbg(NSP32_DEBUG_REGISTER, "exit %d", ret);
+ if (ret) {
+ iounmap(data->MmioAddress);
+ data->MmioAddress = NULL;
+ }
+
return ret;
}
_
reply other threads:[~2006-10-10 21:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200610102141.k9ALfbbF025420@shell0.pdx.osdl.net \
--to=akpm@osdl.org \
--cc=James.Bottomley@steeleye.com \
--cc=amol@verismonetworks.com \
--cc=linux-scsi@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