public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Heiko Stuebner <heiko@sntech.de>
To: Johan Hovold <johan@kernel.org>, Stephen Boyd <sboyd@kernel.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
	linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
	Johan Hovold <johan@kernel.org>,
	stable@vger.kernel.org,
	Sebastian Reichel <sebastian.reichel@collabora.com>
Subject: Re: [PATCH] clk: rk808: fix OF node reference imbalance
Date: Mon, 27 Apr 2026 13:17:39 +0200	[thread overview]
Message-ID: <10504733.NyiUUSuA9g@phil> (raw)
In-Reply-To: <177714062701.5403.1177541832751457755@lazor>

Am Samstag, 25. April 2026, 20:10:27 Mitteleuropäische Sommerzeit schrieb Stephen Boyd:
> Quoting Johan Hovold (2026-04-07 02:50:27)
> > 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: 2dc51ca822e4 ("clk: RK808: Reduce 'struct rk808' usage")
> > Cc: stable@vger.kernel.org      # 6.5
> > Cc: Sebastian Reichel <sebastian.reichel@collabora.com>
> > Signed-off-by: Johan Hovold <johan@kernel.org>
> > ---
> 
> +Heiko

Looking at the device_set_of_node_from_dev() function, this is the
right move, so

Reviewed-by: Heiko Stuebner <heiko@sntech.de>


It also seems the rk808-regulator.c might be another candidate for
this, as it also takes the node without of_node_get and manually
setting the of_node_reused flag.


Heiko


> >  drivers/clk/clk-rk808.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/clk/clk-rk808.c b/drivers/clk/clk-rk808.c
> > index f7412b137e5e..5a75b5c91555 100644
> > --- a/drivers/clk/clk-rk808.c
> > +++ b/drivers/clk/clk-rk808.c
> > @@ -153,7 +153,7 @@ static int rk808_clkout_probe(struct platform_device *pdev)
> >         struct rk808_clkout *rk808_clkout;
> >         int ret;
> >  
> > -       dev->of_node = pdev->dev.parent->of_node;
> > +       device_set_of_node_from_dev(dev, dev->parent);
> >  
> >         rk808_clkout = devm_kzalloc(dev,
> >                                     sizeof(*rk808_clkout), GFP_KERNEL);
> >
> 





  reply	other threads:[~2026-04-27 11:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-07  9:50 [PATCH] clk: rk808: fix OF node reference imbalance Johan Hovold
2026-04-07 10:43 ` Sebastian Reichel
2026-04-07 20:02 ` Brian Masney
2026-04-25 18:10 ` Stephen Boyd
2026-04-27 11:17   ` Heiko Stuebner [this message]
2026-04-27 12:03     ` Johan Hovold
2026-04-27 12:34       ` Heiko Stuebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10504733.NyiUUSuA9g@phil \
    --to=heiko@sntech.de \
    --cc=johan@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@kernel.org \
    --cc=sebastian.reichel@collabora.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox