From: Qinglang Miao <miaoqinglang@huawei.com>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: <linux-mips@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
"Qinglang Miao" <miaoqinglang@huawei.com>
Subject: [PATCH] mips: Vr41xx: add missing iounmap() on error in vr41xx_pciu_init()
Date: Wed, 28 Oct 2020 17:15:48 +0800 [thread overview]
Message-ID: <20201028091548.136303-1-miaoqinglang@huawei.com> (raw)
add missing iounmap() of pciu_base on error when failed to init
io_map_base.
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
---
arch/mips/pci/pci-vr41xx.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/mips/pci/pci-vr41xx.c b/arch/mips/pci/pci-vr41xx.c
index 1fa4e1014..4f250c55b 100644
--- a/arch/mips/pci/pci-vr41xx.c
+++ b/arch/mips/pci/pci-vr41xx.c
@@ -293,8 +293,10 @@ static int __init vr41xx_pciu_init(void)
master = setup->master_io;
io_map_base = ioremap(master->bus_base_address,
resource_size(res));
- if (!io_map_base)
+ if (!io_map_base) {
+ iounmap(pciu_base);
return -EBUSY;
+ }
vr41xx_pci_controller.io_map_base = (unsigned long)io_map_base;
}
--
2.23.0
next reply other threads:[~2020-10-29 1:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-28 9:15 Qinglang Miao [this message]
2020-11-06 10:50 ` Thomas Bogendoerfer
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=20201028091548.136303-1-miaoqinglang@huawei.com \
--to=miaoqinglang@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=tsbogend@alpha.franken.de \
/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
all inboxes | Powered by JetHome®