diff mbox

ppc-6xx: add missing iounmap() on error in hlwd_pic_init()

Message ID CAPgLHd_c62rTu4pdxjC9188LO3k_gqTYdRHny6kAnR7nrfqTKw@mail.gmail.com (mailing list archive)
State Accepted, archived
Commit 8d7c0b527fba4891e5d8c74d78e80cac177bce5e
Delegated to: Scott Wood
Headers show

Commit Message

Wei Yongjun Oct. 12, 2013, 7:13 a.m. UTC
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

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

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

Patch

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;
 	}