Subject: [PATCH] mpc8xx_pic_init(); arch/powerpc/sysdev/mpc8xx_pic.c

From: Roel Kluin <[email-masked]>
Date: Wed, 07 Nov 2007 23:08:42 +0100

Again: untested 
--
iounmap siu_reg on error

Signed-off-by: Roel Kluin <[email-masked]>
---
diff --git a/arch/powerpc/sysdev/mpc8xx_pic.c b/arch/powerpc/sysdev/mpc8xx_pic.c
index 7aa4ff5..1a51251 100644
--- a/arch/powerpc/sysdev/mpc8xx_pic.c
+++ b/arch/powerpc/sysdev/mpc8xx_pic.c
@@ -177,14 +177,15 @@ int mpc8xx_pic_init(void)
 	siu_reg = ioremap(res.start, res.end - res.start + 1);
 	if (siu_reg == NULL)
 		return -EINVAL;
 
 	mpc8xx_pic_host = irq_alloc_host(of_node_get(np), IRQ_HOST_MAP_LINEAR,
 					 64, &mpc8xx_pic_host_ops, 64);
 	if (mpc8xx_pic_host == NULL) {
+		iounmap(siu_reg);
 		printk(KERN_ERR "MPC8xx PIC: failed to allocate irq host!\n");
 		ret = -ENOMEM;
 	}
 
 out:
 	of_node_put(np);
 	return ret;