gpio: uniphier: Bail out on gpiochip_lock_as_irq() error
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 30 Jul 2018 12:38:36 +0000 (15:38 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 6 Aug 2018 21:46:55 +0000 (23:46 +0200)
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>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-uniphier.c

index d3cf9502e7e7f46abeb366c735f2e47d6808e64d..ed2badecc0508c9d2db28cf68638d19dd4a11ff5 100644 (file)
@@ -306,8 +306,7 @@ static int uniphier_gpio_irq_domain_activate(struct irq_domain *domain,
        struct uniphier_gpio_priv *priv = domain->host_data;
        struct gpio_chip *chip = &priv->chip;
 
-       gpiochip_lock_as_irq(chip, data->hwirq + UNIPHIER_GPIO_IRQ_OFFSET);
-       return 0;
+       return gpiochip_lock_as_irq(chip, data->hwirq + UNIPHIER_GPIO_IRQ_OFFSET);
 }
 
 static void uniphier_gpio_irq_domain_deactivate(struct irq_domain *domain,