diff options
| author | Charles Keepax <ckeepax@opensource.cirrus.com> | 2026-05-08 15:34:52 +0100 |
|---|---|---|
| committer | Linus Walleij <linusw@kernel.org> | 2026-05-27 14:24:19 +0200 |
| commit | 1cb73b83ab6dec8159d0280345a46fbb282c378f (patch) | |
| tree | 4df03b8c69639a1bf425b287263f31ff50be47b6 /drivers | |
| parent | ce4e27247ca643645c6d3043aad1c1c67bf7fdac (diff) | |
pinctrl: cs42l43: Fix leaked pm reference on error path
Returning directly if the regmap_update_bits() fails causes a pm runtime
reference to be leaked, let things run to the end of the function
instead.
Fixes: e52c741907fb ("pinctrl: cirrus: cs42l43: use new GPIO line value setter callbacks")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/pinctrl/cirrus/pinctrl-cs42l43.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pinctrl/cirrus/pinctrl-cs42l43.c b/drivers/pinctrl/cirrus/pinctrl-cs42l43.c index 227c37c360e1..3cc183520607 100644 --- a/drivers/pinctrl/cirrus/pinctrl-cs42l43.c +++ b/drivers/pinctrl/cirrus/pinctrl-cs42l43.c @@ -499,12 +499,10 @@ static int cs42l43_gpio_set(struct gpio_chip *chip, unsigned int offset, ret = regmap_update_bits(priv->regmap, CS42L43_GPIO_CTRL1, BIT(shift), value << shift); - if (ret) - return ret; pm_runtime_put(priv->dev); - return 0; + return ret; } static int cs42l43_gpio_direction_out(struct gpio_chip *chip, |
