mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
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: e52c741907 ("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>
This commit is contained in:
parent
ce4e27247c
commit
1cb73b83ab
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user