diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2018-07-30 08:38:34 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2018-08-06 17:46:55 -0400 |
commit | 41d69087fd75f7288378082ee45c850109d9d289 (patch) | |
tree | f09d213475b55bc8427130693e4728ec23785200 | |
parent | 10ed35399ab0a46c2ff07b35977e0d423bde48f2 (diff) |
gpio: em: 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.
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-em.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-em.c b/drivers/gpio/gpio-em.c index 2b466b80e70a..982e699a5b81 100644 --- a/drivers/gpio/gpio-em.c +++ b/drivers/gpio/gpio-em.c | |||
@@ -101,12 +101,14 @@ static void em_gio_irq_enable(struct irq_data *d) | |||
101 | static int em_gio_irq_reqres(struct irq_data *d) | 101 | static int em_gio_irq_reqres(struct irq_data *d) |
102 | { | 102 | { |
103 | struct em_gio_priv *p = irq_data_get_irq_chip_data(d); | 103 | struct em_gio_priv *p = irq_data_get_irq_chip_data(d); |
104 | int ret; | ||
104 | 105 | ||
105 | if (gpiochip_lock_as_irq(&p->gpio_chip, irqd_to_hwirq(d))) { | 106 | ret = gpiochip_lock_as_irq(&p->gpio_chip, irqd_to_hwirq(d)); |
107 | if (ret) { | ||
106 | dev_err(p->gpio_chip.parent, | 108 | dev_err(p->gpio_chip.parent, |
107 | "unable to lock HW IRQ %lu for IRQ\n", | 109 | "unable to lock HW IRQ %lu for IRQ\n", |
108 | irqd_to_hwirq(d)); | 110 | irqd_to_hwirq(d)); |
109 | return -EINVAL; | 111 | return ret; |
110 | } | 112 | } |
111 | return 0; | 113 | return 0; |
112 | } | 114 | } |