提交 5a30d7bf 编写于 作者: K Kulikov Vasiliy 提交者: Paul Mundt

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: NVasiliy Kulikov <segooon@gmail.com>
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 06c7a489
...@@ -79,7 +79,7 @@ struct gpio_chip x3proto_gpio_chip = { ...@@ -79,7 +79,7 @@ struct gpio_chip x3proto_gpio_chip = {
int __init x3proto_gpio_setup(void) int __init x3proto_gpio_setup(void)
{ {
unsigned int ilsel; int ilsel;
int ret, i; int ret, i;
ilsel = ilsel_enable(ILSEL_KEY); ilsel = ilsel_enable(ILSEL_KEY);
...@@ -92,7 +92,7 @@ int __init x3proto_gpio_setup(void) ...@@ -92,7 +92,7 @@ int __init x3proto_gpio_setup(void)
for (i = 0; i < NR_BASEBOARD_GPIOS; i++) { for (i = 0; i < NR_BASEBOARD_GPIOS; i++) {
unsigned long flags; unsigned long flags;
unsigned int irq = create_irq(); int irq = create_irq();
if (unlikely(irq < 0)) { if (unlikely(irq < 0)) {
ret = -EINVAL; ret = -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册