Re: [PATCH 1/5] regulator: arizona-ldo1: fix OF node leak on enable GPIO error

From: Charles Keepax

Date: Wed Dec 02 2026 - 10:59:03 EST


On Mon, Nov 30, 2026 at 09:58:35PM -0800, Dmitry Torokhov wrote:
> arizona_ldo1_common_init() acquires a reference to the child ldo1
> Device Tree node via arizona_ldo1_of_get_pdata() and stores it in the
> regulator configuration, releasing it after devm_regulator_register(). If
> gpiod_get_optional() fails (for example, with -EPROBE_DEFER), the
> function returns early without dropping that reference.
>
> Call of_node_put() on the regulator configuration node before returning
> when acquiring the enable GPIO fails.
>
> Fixes: e1739e86f0cb ("regulator: arizona-ldo1: Look up a descriptor and pass to the core")
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
> ---

Reviewed-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>

Thanks,
Charles