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

login
register
mail settings
Submitter Wei Yongjun
Date Oct. 12, 2013, 7:13 a.m.
Message ID <CAPgLHd_c62rTu4pdxjC9188LO3k_gqTYdRHny6kAnR7nrfqTKw@mail.gmail.com>
Download mbox | patch
Permalink /patch/282984/
State Accepted, archived
Commit 8d7c0b527fba4891e5d8c74d78e80cac177bce5e
Delegated to: Scott Wood
Headers show

Comments

Wei Yongjun - Oct. 12, 2013, 7:13 a.m.
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(+)

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