gpio: mvebu: make mvchip->irqbase signed for error handling
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 7 Nov 2013 07:50:19 +0000 (10:50 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Dec 2013 18:55:50 +0000 (10:55 -0800)
commitaeb94017f672ba2ca8592e7d91fbcc0c3ff63031
treef82d0defc9d6377f68cb1361cc9223e9f7d3cd9e
parentaf8888ac768fbe9d2e526329e632700c1ff6b2fa
gpio: mvebu: make mvchip->irqbase signed for error handling

commit d535922691fc026479fcc03e78ac3d931a54e75a upstream.

There is a bug in mvebu_gpio_probe() where we do:

mvchip->irqbase = irq_alloc_descs(-1, 0, ngpios, -1);
if (mvchip->irqbase < 0) {

The problem is that mvchip->irqbase is unsigned so the error handling
doesn't work.  I have changed it to be a regular int.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpio/gpio-mvebu.c