sh: boards/mach-x3proto: gpio: fix error handling code
Subsystems (2)
PATCH 1/1 sh: boards/mach-x3proto: gpio: fix error handling code
Checks for (irq < 0) and (ilsel < 0) didn't make sense since they were unsigned. Made them signed.
Signed-off-by Vasiliy Kulikov <[email protected]>
---
I cannot compile this driver, so it is not tested.
arch/sh/boards/mach-x3proto/gpio.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/sh/boards/mach-x3proto/gpio.c +2 -2
@@ -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 ;
Signature · 1 line
1.7.0.4
Paul Mundt
AppliedQuoted 4 lines · Vasiliy Kulikov
Checks for (irq < 0) and (ilsel < 0) didn't make sense since they were unsigned. Made them signed.
Signed-off-by Vasiliy Kulikov <[email protected]>
Applied, thanks.