diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2018-07-30 15:38:35 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2018-08-06 23:46:55 +0200 |
commit | 6d7a2b8b559e5682167187d4413d5f11251fcb01 (patch) | |
tree | 1dd5cc909062e7bb3ec0d36dc242a5dda1b1971f /drivers/gpio | |
parent | 41d69087fd75f7288378082ee45c850109d9d289 (diff) | |
download | linux-stable-6d7a2b8b559e5682167187d4413d5f11251fcb01.tar.gz linux-stable-6d7a2b8b559e5682167187d4413d5f11251fcb01.tar.bz2 linux-stable-6d7a2b8b559e5682167187d4413d5f11251fcb01.zip |
gpio: xgene-sb: 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 -ENOSPC 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>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-xgene-sb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-xgene-sb.c b/drivers/gpio/gpio-xgene-sb.c index acd59113e08b..2eb76f35aa7e 100644 --- a/drivers/gpio/gpio-xgene-sb.c +++ b/drivers/gpio/gpio-xgene-sb.c @@ -143,12 +143,14 @@ static int xgene_gpio_sb_domain_activate(struct irq_domain *d, { struct xgene_gpio_sb *priv = d->host_data; u32 gpio = HWIRQ_TO_GPIO(priv, irq_data->hwirq); + int ret; - if (gpiochip_lock_as_irq(&priv->gc, gpio)) { + ret = gpiochip_lock_as_irq(&priv->gc, gpio); + if (ret) { dev_err(priv->gc.parent, "Unable to configure XGene GPIO standby pin %d as IRQ\n", gpio); - return -ENOSPC; + return ret; } xgene_gpio_set_bit(&priv->gc, priv->regs + MPA_GPIO_SEL_LO, |