summaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2018-07-30 14:38:37 +0200
committerLinus Walleij <linus.walleij@linaro.org>2018-08-06 23:46:55 +0200
commitf8ad8aa551af812adf2ba49a554c73cc9daa8d36 (patch)
tree8ef6c77427c37a99f59309f8f7e1a0ad446e97de /drivers/gpio
parentgpio: uniphier: Bail out on gpiochip_lock_as_irq() error (diff)
downloadlinux-f8ad8aa551af812adf2ba49a554c73cc9daa8d36.tar.xz
linux-f8ad8aa551af812adf2ba49a554c73cc9daa8d36.zip
gpio: vr41xx: Bail out on gpiochip_lock_as_irq() error
gpiochip_lock_as_irq() may return a few error codes, bail out if it fails with corresponding returned code. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-vr41xx.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-vr41xx.c b/drivers/gpio/gpio-vr41xx.c
index ac8deb01f6f6..027699cec911 100644
--- a/drivers/gpio/gpio-vr41xx.c
+++ b/drivers/gpio/gpio-vr41xx.c
@@ -138,10 +138,16 @@ static void unmask_giuint_low(struct irq_data *d)
static unsigned int startup_giuint(struct irq_data *data)
{
- if (gpiochip_lock_as_irq(&vr41xx_gpio_chip, data->hwirq))
+ int ret;
+
+ ret = gpiochip_lock_as_irq(&vr41xx_gpio_chip, irqd_to_hwirq(data));
+ if (ret) {
dev_err(vr41xx_gpio_chip.parent,
"unable to lock HW IRQ %lu for IRQ\n",
data->hwirq);
+ return ret;
+ }
+
/* Satisfy the .enable semantics by unmasking the line */
unmask_giuint_low(data);
return 0;