Re: [PATCH v2] regulator: as3722: use the platform OF node setter

From: Bartosz Golaszewski

Date: Thu Nov 05 2026 - 09:08:51 EST


On Thu, Nov 05, 2026 at 06:03:41PM +0800, Yige Jiang wrote:
> as3722_get_regulator_dt_data() gets the regulators child node and
> assigns it only to dev.of_node. Platform device release now puts
> dev.fwnode, leaving the acquired node reference unreleased.
>
> Use platform_device_set_of_node() to synchronize both fields and
> give the device its own reference. Use __free(device_node) to release
> the local lookup reference when the function returns. This keeps
> the node valid for regulator matching and the platform device
> lifetime, while also replacing the previous device-owned reference
> on a probe retry.
>
> Fixes: 7b5b51b2b05c ("driver core: platform: count references to all kinds of firmware nodes")
> Signed-off-by: Yige Jiang <yigejiang86@xxxxxxxxx>
> ---

Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>

As mark said: don't send new versions in response to previous threads.