gpio: em: Fix checking return value of irq_alloc_descs
PATCH 1/1 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]>
--- drivers/gpio/gpio-em.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpio/gpio-em.c +2 -2
@@ -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);
Signature · 1 line
1.7.9.5
Quoted 3 lines · Axel Lin
irq_alloc_descs()returns negative error code on failure.Signed-off-by Axel Lin <[email protected]>
Magnuis can I have your ACK on this?
Yours,
Linus Walleij
Magnus Damm
Acked-byQuoted 7 lines · Linus Walleij
Quoted 3 lines · Axel Lin
irq_alloc_descs()returns negative error code on failure.Signed-off-by Axel Lin <[email protected]>Magnuis can I have your ACK on this?
Yes, of course! I never disagree with bug fixes =)
Acked-by Magnus Damm <[email protected]>
Thanks a lot to both Axel and you!
/ magnus
Quoted 3 lines · Axel Lin
irq_alloc_descs()returns negative error code on failure.Signed-off-by Axel Lin <[email protected]>
Applied with Magnus' ACK.
Yours,
Linus Walleij