From: Christophe Leroy <christophe.leroy@csgroup.eu>
No need to BUG() in case mpic_alloc() fails. Use WARN_ON().
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Pali Rohár <pali@kernel.org>
---
arch/powerpc/platforms/85xx/mpc85xx_ds.c | 4 +++-
arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
@@ -62,7 +62,9 @@ void __init mpc85xx_ds_pic_init(void)
mpic = mpic_alloc(NULL, 0, flags, 0, 256, " OpenPIC ");
- BUG_ON(mpic == NULL);
+ if (WARN_ON(!mpic))
+ return;
+
mpic_init(mpic);
#ifdef CONFIG_PPC_I8259
@@ -39,7 +39,9 @@ void __init mpc85xx_rdb_pic_init(void)
mpic = mpic_alloc(NULL, 0, flags, 0, 256, " OpenPIC ");
- BUG_ON(mpic == NULL);
+ if (WARN_ON(!mpic))
+ return;
+
mpic_init(mpic);
}