diff options
author | Todd Poynor <toddpoynor@google.com> | 2011-07-18 07:43:14 -0700 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2011-08-23 10:53:00 -0700 |
commit | 832337490f22987a1b739ba840e105c0c9af01bc (patch) | |
tree | a893d220f2d568a0628c77c04d1b9c9899474f87 /drivers/gpio/gpio-omap.c | |
parent | ece9528e5f88cee11303fceefe39382f1030cd4e (diff) |
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>
Diffstat (limited to 'drivers/gpio/gpio-omap.c')
-rw-r--r-- | drivers/gpio/gpio-omap.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index 34a7110d9bc8..f0208a958185 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -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. */ |