gpio/omap: check return value from irq_alloc_generic_chip
Ensure return value of irq_alloc_generic_chip() is checked before continuing on to use it. Signed-off-by: Todd Poynor <toddpoynor@google.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
This commit is contained in:
committed by
Kevin Hilman
parent
ece9528e5f
commit
832337490f
@@ -1090,6 +1090,11 @@ omap_mpuio_alloc_gc(struct gpio_bank *bank, unsigned int irq_start,
|
|||||||
|
|
||||||
gc = irq_alloc_generic_chip("MPUIO", 1, irq_start, bank->base,
|
gc = irq_alloc_generic_chip("MPUIO", 1, irq_start, bank->base,
|
||||||
handle_simple_irq);
|
handle_simple_irq);
|
||||||
|
if (!gc) {
|
||||||
|
dev_err(bank->dev, "Memory alloc failed for gc\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ct = gc->chip_types;
|
ct = gc->chip_types;
|
||||||
|
|
||||||
/* NOTE: No ack required, reading IRQ status clears it. */
|
/* NOTE: No ack required, reading IRQ status clears it. */
|
||||||
|
Reference in New Issue
Block a user