projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ece9528
)
gpio/omap: check return value from irq_alloc_generic_chip
author
Todd Poynor
<toddpoynor@google.com>
Mon, 18 Jul 2011 14:43:14 +0000
(07:43 -0700)
committer
Kevin Hilman
<khilman@ti.com>
Tue, 23 Aug 2011 17:53:00 +0000
(10:53 -0700)
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>
drivers/gpio/gpio-omap.c
patch
|
blob
|
history
diff --git
a/drivers/gpio/gpio-omap.c
b/drivers/gpio/gpio-omap.c
index
34a7110
..
f0208a9
100644
(file)
--- 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. */