diff options
author | Grygorii Strashko <grygorii.strashko@linaro.org> | 2015-06-24 17:54:17 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-07-16 10:35:56 +0200 |
commit | 977bd8a94c40851a843e9186b9eb823bdfa5ace2 (patch) | |
tree | 032da04d9fbfbbf28f417e1b1efeca2deec8de19 /drivers/gpio | |
parent | 2252607d327d5219a6331b50e6ec266d56402be0 (diff) |
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>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-omap.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index b0c57d505be7..a0ad8030a7ef 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -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); |