linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gabor Juhos <j4g8y7@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>,
	 Gregory Clement <gregory.clement@bootlin.com>,
	 Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	 Linus Walleij <linus.walleij@linaro.org>,
	 Bartosz Golaszewski <brgl@bgdev.pl>
Cc: linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org,
	 linux-kernel@vger.kernel.org, Gabor Juhos <j4g8y7@gmail.com>,
	 stable@vger.kernel.org, Imre Kaloz <kaloz@openwrt.org>
Subject: [PATCH 2/7] pinctrl: armada-37xx: propagate error from armada_37xx_gpio_direction_output()
Date: Mon, 12 May 2025 16:22:38 +0200	[thread overview]
Message-ID: <20250512-pinctrl-a37xx-fixes-v1-2-d470fb1116a5@gmail.com> (raw)
In-Reply-To: <20250512-pinctrl-a37xx-fixes-v1-0-d470fb1116a5@gmail.com>

The regmap_update_bits() function can fail, so propagate its error
up to the stack instead of silently ignoring that.

Cc: stable@vger.kernel.org
Fixes: 6702abb3bf23 ("pinctrl: armada-37xx: Fix direction_output() callback behavior")
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
---
 drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index 43034d29292687e875136aafa530b62479dc55ec..e0c8eebf40588a1b49b80e2a1ddcc2a35fa7c07b 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -433,9 +433,7 @@ static int armada_37xx_gpio_direction_output(struct gpio_chip *chip,
 	armada_37xx_update_reg(&reg, &val_offset);
 
 	val = value ? mask : 0;
-	regmap_update_bits(info->regmap, reg, mask, val);
-
-	return 0;
+	return regmap_update_bits(info->regmap, reg, mask, val);
 }
 
 static int armada_37xx_gpio_get(struct gpio_chip *chip, unsigned int offset)

-- 
2.49.0


  parent reply	other threads:[~2025-05-12 14:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-12 14:22 [PATCH 0/7] pinctrl: armada-37xx: a couple of small fixes Gabor Juhos
2025-05-12 14:22 ` [PATCH 1/7] pinctrl: armada-37xx: use correct OUTPUT_VAL register for GPIOs > 31 Gabor Juhos
2025-05-12 21:28   ` Andrew Lunn
2025-05-12 14:22 ` Gabor Juhos [this message]
2025-05-12 21:29   ` [PATCH 2/7] pinctrl: armada-37xx: propagate error from armada_37xx_gpio_direction_output() Andrew Lunn
2025-05-12 14:22 ` [PATCH 3/7] pinctrl: armada-37xx: set GPIO output value before setting direction Gabor Juhos
2025-05-12 21:30   ` Andrew Lunn
2025-05-12 14:22 ` [PATCH 4/7] pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get() Gabor Juhos
2025-05-12 21:31   ` Andrew Lunn
2025-05-12 14:22 ` [PATCH 5/7] pinctrl: armada-37xx: propagate error from armada_37xx_pmx_gpio_set_direction() Gabor Juhos
2025-05-12 21:31   ` [PATCH 5/7] pinctrl: armada-37xx: propagate error from armada_37xx_pmx_gpio_set_direction()' Andrew Lunn
2025-05-12 14:22 ` [PATCH 6/7] pinctrl: armada-37xx: propagate error from armada_37xx_gpio_get_direction() Gabor Juhos
2025-05-12 21:31   ` Andrew Lunn
2025-05-12 14:22 ` [PATCH 7/7] pinctrl: armada-37xx: propagate error from armada_37xx_pmx_set_by_name() Gabor Juhos
2025-05-12 21:32   ` Andrew Lunn
2025-05-12 21:33 ` [PATCH 0/7] pinctrl: armada-37xx: a couple of small fixes Andrew Lunn
2025-05-13 13:36   ` Linus Walleij
2025-05-13 16:51     ` Gabor Juhos
2025-05-13 18:46       ` Andrew Lunn
2025-05-13 19:24         ` Gabor Juhos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250512-pinctrl-a37xx-fixes-v1-2-d470fb1116a5@gmail.com \
    --to=j4g8y7@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=brgl@bgdev.pl \
    --cc=gregory.clement@bootlin.com \
    --cc=kaloz@openwrt.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).