Skip to content

Commit

Permalink
gpio/omap: check return value from irq_alloc_generic_chip
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Todd Poynor authored and Kevin Hilman committed Aug 23, 2011
1 parent ece9528 commit 8323374
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/gpio/gpio-omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
handle_simple_irq);
if (!gc) {
dev_err(bank->dev, "Memory alloc failed for gc\n");
return;
}

ct = gc->chip_types;

/* NOTE: No ack required, reading IRQ status clears it. */
Expand Down

0 comments on commit 8323374

Please sign in to comment.