From: Daeseok Youn <daeseok.youn@gmail.com>
To: JBottomley@parallels.com
Cc: hch@lst.de, hare@suse.de, michaelc@cs.wisc.edu,
martin.petersen@oracle.com, daeseok.youn@gmail.com,
ben@decadent.org.uk, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH] scsi: missing iounmap for mvi->regs_ex
Date: Wed, 28 Jan 2015 19:22:08 +0900 [thread overview]
Message-ID: <20150128102208.GA16509@devel.8.8.4.4> (raw)
It also need to call iounmap() when it fails to get res_start and
res_len from pci_resource_start{len}(pdev, bar).
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
drivers/scsi/mvsas/mv_init.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c
index 53030b0..2508db2 100644
--- a/drivers/scsi/mvsas/mv_init.c
+++ b/drivers/scsi/mvsas/mv_init.c
@@ -348,15 +348,15 @@ int mvs_ioremap(struct mvs_info *mvi, int bar, int bar_ex)
else
mvi->regs = ioremap_nocache(res_start, res_len);
- if (!mvi->regs) {
- if (mvi->regs_ex && (res_flag_ex & IORESOURCE_MEM))
- iounmap(mvi->regs_ex);
- mvi->regs_ex = NULL;
+ if (!mvi->regs)
goto err_out;
- }
return 0;
err_out:
+ if (mvi->regs_ex && (res_flag_ex & IORESOURCE_MEM))
+ iounmap(mvi->regs_ex);
+ mvi->regs_ex = NULL;
+
return -1;
}
--
1.7.1
reply other threads:[~2015-01-28 10:22 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=20150128102208.GA16509@devel.8.8.4.4 \
--to=daeseok.youn@gmail.com \
--cc=JBottomley@parallels.com \
--cc=ben@decadent.org.uk \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=michaelc@cs.wisc.edu \
/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).