提交 41d69087 编写于 作者: A Andy Shevchenko 提交者: Linus Walleij

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: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 10ed3539
...@@ -101,12 +101,14 @@ static void em_gio_irq_enable(struct irq_data *d) ...@@ -101,12 +101,14 @@ static void em_gio_irq_enable(struct irq_data *d)
static int em_gio_irq_reqres(struct irq_data *d) static int em_gio_irq_reqres(struct irq_data *d)
{ {
struct em_gio_priv *p = irq_data_get_irq_chip_data(d); struct em_gio_priv *p = irq_data_get_irq_chip_data(d);
int ret;
if (gpiochip_lock_as_irq(&p->gpio_chip, irqd_to_hwirq(d))) { ret = gpiochip_lock_as_irq(&p->gpio_chip, irqd_to_hwirq(d));
if (ret) {
dev_err(p->gpio_chip.parent, dev_err(p->gpio_chip.parent,
"unable to lock HW IRQ %lu for IRQ\n", "unable to lock HW IRQ %lu for IRQ\n",
irqd_to_hwirq(d)); irqd_to_hwirq(d));
return -EINVAL; return ret;
} }
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册