[PATCH] mpc8xx_pic_init(); arch/powerpc/sysdev/mpc8xx_pic.c
Roel Kluin
12o3l at tiscali.nl
Thu Nov 8 09:08:42 EST 2007
Again: untested
--
iounmap siu_reg on error
Signed-off-by: Roel Kluin <12o3l at tiscali.nl>
---
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;
More information about the Linuxppc-dev
mailing list