All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mips: Vr41xx: add missing iounmap() on error in vr41xx_pciu_init()
@ 2020-10-28  9:15 Qinglang Miao
  2020-11-06 10:50 ` Thomas Bogendoerfer
  0 siblings, 1 reply; 2+ messages in thread
From: Qinglang Miao @ 2020-10-28  9:15 UTC (permalink / raw
  To: Thomas Bogendoerfer; +Cc: linux-mips, linux-kernel, Qinglang Miao

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mips: Vr41xx: add missing iounmap() on error in vr41xx_pciu_init()
  2020-10-28  9:15 [PATCH] mips: Vr41xx: add missing iounmap() on error in vr41xx_pciu_init() Qinglang Miao
@ 2020-11-06 10:50 ` Thomas Bogendoerfer
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Bogendoerfer @ 2020-11-06 10:50 UTC (permalink / raw
  To: Qinglang Miao; +Cc: linux-mips, linux-kernel

On Wed, Oct 28, 2020 at 05:15:48PM +0800, Qinglang Miao wrote:
> 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(-)

applied to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-06 10:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-28  9:15 [PATCH] mips: Vr41xx: add missing iounmap() on error in vr41xx_pciu_init() Qinglang Miao
2020-11-06 10:50 ` Thomas Bogendoerfer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.