Re: [PATCH] gpio: arizona: Fix runtime PM leak in arizona_gpio_direction_out()
From: Charles Keepax
Date: Wed Sep 16 2026 - 06:02:28 EST
On Wed, Sep 16, 2026 at 09:47:01AM +0000, Wentao Liang wrote:
> Switching a persistent GPIO line from input to output acquires a
> runtime PM reference on the parent device, but if the subsequent
> regmap_update_bits() fails the reference is never dropped and no later
> direction_in() can balance it since the direction was never changed.
> Drop the reference on the update failure path.
>
> Fixes: 27a49ed17e22 ("gpio: arizona: Add support for GPIOs that need to be maintained")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Wentao Liang <vulab@xxxxxxxxxxx>
> ---
Reviewed-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>
Thanks,
Charles