@@ -419,6 +419,13 @@ void __init orion_gpio_init(int gpio_base, int ngpio,
gc = irq_alloc_generic_chip("orion_gpio_irq", 2, secondary_irq_base,
ochip->base, handle_level_irq);
+
+ if (!gc) {
+ pr_err("%s: irq_alloc_generic_chip for IRQ %d failed\n",
+ __func__, secondary_irq_base);
+ return;
+ }
+
gc->private = ochip;
ct = gc->chip_types;
@@ -26,6 +26,13 @@ void __init orion_irq_init(unsigned int irq_start, void __iomem *maskaddr)
gc = irq_alloc_generic_chip("orion_irq", 1, irq_start, maskaddr,
handle_level_irq);
+
+ if (!gc) {
+ pr_err("%s: irq_alloc_generic_chip for IRQ %u failed\n",
+ __func__, irq_start);
+ return;
+ }
+
ct = gc->chip_types;
ct->chip.irq_mask = irq_gc_mask_clr_bit;
ct->chip.irq_unmask = irq_gc_mask_set_bit;
Signed-off-by: Todd Poynor <toddpoynor@google.com> --- arch/arm/plat-orion/gpio.c | 7 +++++++ arch/arm/plat-orion/irq.c | 7 +++++++ 2 files changed, 14 insertions(+), 0 deletions(-)