mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
gpio: em: Fix checking return value of irq_alloc_descs
irq_alloc_descs() returns negative error code on failure. Signed-off-by: Axel Lin <[email protected]> Acked-by: Magnus Damm <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
4c30aa33d4
commit
dd2914972e
1 changed files with 2 additions and 2 deletions
|
|
@ -247,9 +247,9 @@ static int __devinit em_gio_irq_domain_init(struct em_gio_priv *p)
|
|||
|
||||
p->irq_base = irq_alloc_descs(pdata->irq_base, 0,
|
||||
pdata->number_of_pins, numa_node_id());
|
||||
if (IS_ERR_VALUE(p->irq_base)) {
|
||||
if (p->irq_base < 0) {
|
||||
dev_err(&pdev->dev, "cannot get irq_desc\n");
|
||||
return -ENXIO;
|
||||
return p->irq_base;
|
||||
}
|
||||
pr_debug("gio: hw base = %d, nr = %d, sw base = %d\n",
|
||||
pdata->gpio_base, pdata->number_of_pins, p->irq_base);
|
||||
|
|
|
|||
Loading…
Reference in a new issue