From: Wei Yongjun <yongjun_...@trendmicro.com.cn>

Add the missing iounmap() before return from hlwd_pic_init()
in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_...@trendmicro.com.cn>
---
 arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/platforms/embedded6xx/hlwd-pic.c 
b/arch/powerpc/platforms/embedded6xx/hlwd-pic.c
index 7cab21d..6c03034 100644
--- a/arch/powerpc/platforms/embedded6xx/hlwd-pic.c
+++ b/arch/powerpc/platforms/embedded6xx/hlwd-pic.c
@@ -183,6 +183,7 @@ struct irq_domain *hlwd_pic_init(struct device_node *np)
                                           &hlwd_irq_domain_ops, io_base);
        if (!irq_domain) {
                pr_err("failed to allocate irq_domain\n");
+               iounmap(io_base);
                return NULL;
        }
 

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to