summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-bcm-kona.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2018-07-30 14:38:32 +0200
committerLinus Walleij <linus.walleij@linaro.org>2018-08-06 23:46:55 +0200
commit9b073332dd12553751951b08f78d7d1416f5bee2 (patch)
tree2dd54d3938deabd24dbfa9b2490047cbcd2a8f15 /drivers/gpio/gpio-bcm-kona.c
parentgpiolib: Don't shadow error code of gpiochip_lock_as_irq() (diff)
downloadlinux-9b073332dd12553751951b08f78d7d1416f5bee2.tar.xz
linux-9b073332dd12553751951b08f78d7d1416f5bee2.zip
gpio: bcm-kona: Don't shadow error code of gpiochip_lock_as_irq()
gpiochip_lock_as_irq() may return a few error codes, do not shadow them by -EINVAL and let caller to decide. No functional change intended. Cc: Ray Jui <rjui@broadcom.com> Cc: Scott Branden <sbranden@broadcom.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-bcm-kona.c')
-rw-r--r--drivers/gpio/gpio-bcm-kona.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c
index 00272fa7cc4f..d0707fc23afd 100644
--- a/drivers/gpio/gpio-bcm-kona.c
+++ b/drivers/gpio/gpio-bcm-kona.c
@@ -485,12 +485,14 @@ static void bcm_kona_gpio_irq_handler(struct irq_desc *desc)
static int bcm_kona_gpio_irq_reqres(struct irq_data *d)
{
struct bcm_kona_gpio *kona_gpio = irq_data_get_irq_chip_data(d);
+ int ret;
- if (gpiochip_lock_as_irq(&kona_gpio->gpio_chip, d->hwirq)) {
+ ret = gpiochip_lock_as_irq(&kona_gpio->gpio_chip, d->hwirq);
+ if (ret) {
dev_err(kona_gpio->gpio_chip.parent,
"unable to lock HW IRQ %lu for IRQ\n",
d->hwirq);
- return -EINVAL;
+ return ret;
}
return 0;
}