[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190610171103.30903-20-grygorii.strashko@ti.com>
Date: Mon, 10 Jun 2019 20:11:02 +0300
From: Grygorii Strashko <grygorii.strashko@...com>
To: Russell King <rmk@....linux.org.uk>,
Linus Walleij <linus.walleij@...aro.org>,
Tony Lindgren <tony@...mide.com>
CC: Bartosz Golaszewski <bgolaszewski@...libre.com>,
<linux-omap@...r.kernel.org>, <linux-gpio@...r.kernel.org>,
<linux-kernel@...r.kernel.org>,
Santosh Shilimkar <ssantosh@...nel.org>,
Russell King <rmk+kernel@...linux.org.uk>,
Grygorii Strashko <grygorii.strashko@...com>
Subject: [PATCH-next 19/20] gpio: gpio-omap: irq_startup() must not return error codes
From: Russell King <rmk+kernel@...linux.org.uk>
The irq_startup() method returns an unsigned int, but in __irq_startup()
it is assigned to an int. However, nothing checks for errors, so any
error that is returned is ignored.
Remove the check for GPIO-input mode and the error return.
Signed-off-by: Russell King <rmk+kernel@...linux.org.uk>
Signed-off-by: Grygorii Strashko <grygorii.strashko@...com>
---
drivers/gpio/gpio-omap.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 61e32c7e6670..94b10dfbff3f 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -635,8 +635,6 @@ static unsigned int omap_gpio_irq_startup(struct irq_data *d)
if (!LINE_USED(bank->mod_usage, offset))
omap_set_gpio_direction(bank, offset, 1);
- else if (!omap_gpio_is_input(bank, offset))
- goto err;
omap_enable_gpio_module(bank, offset);
bank->irq_usage |= BIT(offset);
@@ -644,9 +642,6 @@ static unsigned int omap_gpio_irq_startup(struct irq_data *d)
omap_gpio_unmask_irq(d);
return 0;
-err:
- raw_spin_unlock_irqrestore(&bank->lock, flags);
- return -EINVAL;
}
static void omap_gpio_irq_shutdown(struct irq_data *d)
--
2.17.1
Powered by blists - more mailing lists