Re: [PATCH] regulator: bq257xx: drop confusing configuration of_node

From: Johan Hovold

Date: Wed Jun 03 2026 - 11:20:09 EST


On Wed, Apr 08, 2026 at 02:53:47PM +0200, Johan Hovold wrote:
> The driver reuses the OF node of the parent multi-function device but
> still sets the of_node field of the regulator configuration to any prior
> OF node.
>
> Since the MFD child device does not have an OF node set until probe is
> called, this field is set to NULL on first probe and to the reused OF
> node if the driver is later rebound.
>
> As the device_set_of_node_from_dev() helper drops a reference to any
> prior OF node before taking a reference to the new one this can
> apparently also confuse LLMs like Sashiko which flags it as a potential
> use-after-free (which it is not).
>
> Drop the confusing and redundant configuration of_node assignment.
>
> Link: https://sashiko.dev/#/patchset/20260408073055.5183-1-johan%40kernel.org
> Signed-off-by: Johan Hovold <johan@xxxxxxxxxx>
> ---
>
> This is a follow-up to the reused OF node imbalance series:
>
> https://lore.kernel.org/lkml/20260408073055.5183-1-johan@xxxxxxxxxx/
>
> to address a false-positive Sashiko report.

Can this one be picked up now?

Johan