sh: boards/mach-x3proto: gpio: fix error handling code
authorKulikov Vasiliy <segooon@gmail.com>
Sun, 10 Oct 2010 17:28:27 +0000 (17:28 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 11 Oct 2010 15:34:42 +0000 (00:34 +0900)
Checks for (irq < 0) and (ilsel < 0) didn't make sense since they were
unsigned.  Made them signed.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/boards/mach-x3proto/gpio.c

index 9fcd7ce6aa42d58b1cb42813c11d4b123fed6757..594adf76e46ac5be7ad08b82e480c39406f2ff9f 100644 (file)
@@ -79,7 +79,7 @@ struct gpio_chip x3proto_gpio_chip = {
 
 int __init x3proto_gpio_setup(void)
 {
-       unsigned int ilsel;
+       int ilsel;
        int ret, i;
 
        ilsel = ilsel_enable(ILSEL_KEY);
@@ -92,7 +92,7 @@ int __init x3proto_gpio_setup(void)
 
        for (i = 0; i < NR_BASEBOARD_GPIOS; i++) {
                unsigned long flags;
-               unsigned int irq = create_irq();
+               int irq = create_irq();
 
                if (unlikely(irq < 0)) {
                        ret = -EINVAL;