mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 23:20:05 +00:00
gpio: omap: add missed spin_unlock_irqrestore in omap_gpio_irq_type
Add missed spin_unlock_irqrestore in omap_gpio_irq_type when omap_set_gpio_triggering() is failed. It fixes static checker warning: drivers/gpio/gpio-omap.c:523 omap_gpio_irq_type() warn: inconsistent returns 'spin_lock:&bank->lock'. This fixes commit: 1562e4618ded ('gpio: omap: fix error handling in omap_gpio_irq_type') Reported-by: Javier Martinez Canillas <javier@dowhile0.org> Signed-off-by: Grygorii Strashko <grygorii.strashko@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
2252607d32
commit
977bd8a94c
@ -500,8 +500,10 @@ static int omap_gpio_irq_type(struct irq_data *d, unsigned type)
|
||||
|
||||
spin_lock_irqsave(&bank->lock, flags);
|
||||
retval = omap_set_gpio_triggering(bank, offset, type);
|
||||
if (retval)
|
||||
if (retval) {
|
||||
spin_unlock_irqrestore(&bank->lock, flags);
|
||||
goto error;
|
||||
}
|
||||
omap_gpio_init_irq(bank, offset);
|
||||
if (!omap_gpio_is_input(bank, offset)) {
|
||||
spin_unlock_irqrestore(&bank->lock, flags);
|
||||
|
Loading…
x
Reference in New Issue
Block a user