diff mbox series

[v1,6/8] gpio: xgene-sb: Don't shadow error code of gpiochip_lock_as_irq()

Message ID 20180730123837.3936-6-andriy.shevchenko@linux.intel.com
State New
Headers show
Series [v1,1/8] pinctrl: intel: Don't shadow error code of gpiochip_lock_as_irq() | expand

Commit Message

Andy Shevchenko July 30, 2018, 12:38 p.m. UTC
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>
---
 drivers/gpio/gpio-xgene-sb.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Linus Walleij Aug. 5, 2018, 12:19 p.m. UTC | #1
On Mon, Jul 30, 2018 at 2:38 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:

> 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>

Patch applied.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox series

Patch

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,