Re: [PATCH 2/2] regulator: rk808: fix OF node reference imbalance

From: Johan Hovold

Date: Wed Apr 08 2026 - 03:36:14 EST


On Tue, Apr 07, 2026 at 05:57:06PM -0700, Doug Anderson wrote:

> On Tue, Apr 7, 2026 at 2:42 AM Johan Hovold <johan@xxxxxxxxxx> wrote:
> >
> > The driver reuses the OF node of the parent multi-function device but
> > fails to take another reference to balance the one dropped by the
> > platform bus code when unbinding the MFD and deregistering the child
> > devices.
> >
> > Fix this by using the intended helper for reusing OF nodes.
> >
> > Fixes: 5111c931f36c ("regulator: rk808: cleanup parent device usage")
>
> I don't think this is quite the right "Fixes". Even before that
> commit, the driver copied the parent's "of_node" and still set
> "of_node_reused".
>
> The first place I see the parent's "of_node" being copied is actually
> commit 647e57351f8e ("regulator: rk808: reduce 'struct rk808' usage").
> "of_node_reused" is first set in commit 1b9e86d445a0 ("regulator:
> rk808: fix asynchronous probing"), but really that should have been
> set in the beginning anyway...

Indeed, thanks for catching that. I've just sent a v2 of the series with
the correct tag and that includes all of the regulator fixes that
unfortunately ended up being being spread over three series.

Johan