summaryrefslogtreecommitdiff
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2018-07-30 15:38:30 +0300
committerLinus Walleij <linus.walleij@linaro.org>2018-08-03 19:42:58 +0200
commitcb85d2b04b408ba8328eb5fa1e184cc538ba8c6a (patch)
tree32c7fb630b2628efdc29338ea5871d4199dad731 /drivers/pinctrl
parentb5031b7db77dc47f474f0efc2b2552c32b7bb59d (diff)
pinctrl: intel: 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: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/intel/pinctrl-intel.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c
index d023b64825d0..62b009b27eda 100644
--- a/drivers/pinctrl/intel/pinctrl-intel.c
+++ b/drivers/pinctrl/intel/pinctrl-intel.c
@@ -877,13 +877,15 @@ static int intel_gpio_irq_reqres(struct irq_data *d)
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
struct intel_pinctrl *pctrl = gpiochip_get_data(gc);
int pin;
+ int ret;
pin = intel_gpio_to_pin(pctrl, irqd_to_hwirq(d), NULL, NULL);
if (pin >= 0) {
- if (gpiochip_lock_as_irq(gc, pin)) {
+ ret = gpiochip_lock_as_irq(gc, pin);
+ if (ret) {
dev_err(pctrl->dev, "unable to lock HW IRQ %d for IRQ\n",
pin);
- return -EINVAL;
+ return ret;
}
}
return 0;