summaryrefslogtreecommitdiff
path: root/arch/mips/pci
diff options
context:
space:
mode:
authorQinglang Miao <miaoqinglang@huawei.com>2020-10-28 12:15:48 +0300
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2020-11-06 13:35:46 +0300
commitc424dc4cd1809e181a161723f770b7bc1e0f9927 (patch)
tree79adef472762f37befe32f0c0ec7a989c1ccc964 /arch/mips/pci
parent2673ecf9586551c5bcee499c1cc1949f6f7cc9a1 (diff)
downloadlinux-c424dc4cd1809e181a161723f770b7bc1e0f9927.tar.xz
mips: Vr41xx: add missing iounmap() on error in vr41xx_pciu_init()
add missing iounmap() of pciu_base on error when failed to init io_map_base. Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'arch/mips/pci')
-rw-r--r--arch/mips/pci/pci-vr41xx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/mips/pci/pci-vr41xx.c b/arch/mips/pci/pci-vr41xx.c
index 1fa4e101470c..4f250c55b6e6 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;
}