diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2018-07-30 08:38:33 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2018-08-06 17:46:55 -0400 |
commit | 10ed35399ab0a46c2ff07b35977e0d423bde48f2 (patch) | |
tree | 7805dc5c8ba2750adc145244e31a5934b7608627 | |
parent | 9b073332dd12553751951b08f78d7d1416f5bee2 (diff) |
gpio: dwapb: 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: Hoan Tran <hotran@apm.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | drivers/gpio/gpio-dwapb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c index 7a2de3de6571..28da700f5f52 100644 --- a/drivers/gpio/gpio-dwapb.c +++ b/drivers/gpio/gpio-dwapb.c | |||
@@ -255,11 +255,13 @@ static int dwapb_irq_reqres(struct irq_data *d) | |||
255 | struct irq_chip_generic *igc = irq_data_get_irq_chip_data(d); | 255 | struct irq_chip_generic *igc = irq_data_get_irq_chip_data(d); |
256 | struct dwapb_gpio *gpio = igc->private; | 256 | struct dwapb_gpio *gpio = igc->private; |
257 | struct gpio_chip *gc = &gpio->ports[0].gc; | 257 | struct gpio_chip *gc = &gpio->ports[0].gc; |
258 | int ret; | ||
258 | 259 | ||
259 | if (gpiochip_lock_as_irq(gc, irqd_to_hwirq(d))) { | 260 | ret = gpiochip_lock_as_irq(gc, irqd_to_hwirq(d)); |
261 | if (ret) { | ||
260 | dev_err(gpio->dev, "unable to lock HW IRQ %lu for IRQ\n", | 262 | dev_err(gpio->dev, "unable to lock HW IRQ %lu for IRQ\n", |
261 | irqd_to_hwirq(d)); | 263 | irqd_to_hwirq(d)); |
262 | return -EINVAL; | 264 | return ret; |
263 | } | 265 | } |
264 | return 0; | 266 | return 0; |
265 | } | 267 | } |