Skip to content

Commit

Permalink
gpio: omap: irq_startup() must not return error codes
Browse files Browse the repository at this point in the history
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@armlinux.org.uk>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Russell King authored and Linus Walleij committed Jun 12, 2019
1 parent 40fd422 commit f1c32ef
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/gpio/gpio-omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,18 +635,13 @@ 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);

raw_spin_unlock_irqrestore(&bank->lock, flags);
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)
Expand Down

0 comments on commit f1c32ef

Please sign in to comment.