[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJM55Z_3FzKaLJVeR+Yj+gfYBL0aOLEvMOiCVqzamUDgzvSdTw@mail.gmail.com>
Date: Wed, 26 Nov 2025 10:52:53 +0100
From: Emil Renner Berthing <emil.renner.berthing@...onical.com>
To: Haotian Zhang <vulab@...as.ac.cn>, hal.feng@...rfivetech.com, mturquette@...libre.com,
sboyd@...nel.org
Cc: linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] clk: starfive: jh7110-sys: Use devm_clk_notifier_register()
Quoting Haotian Zhang (2025-11-26 04:25:34)
> The clk_notifier_register() in jh7110_syscrg_probe() is not unregistered
> in the error path, leading to a resource leak and potential use-after-free
> if probe fails after the notifier is registered.
>
> Use devm_clk_notifier_register() instead to automatically unregister
> the notifier.
>
> Fixes: 538d5477b252 ("clk: starfive: jh7110-sys: Add notifier for PLL0 clock")
> Signed-off-by: Haotian Zhang <vulab@...as.ac.cn>
Thanks!
Reviewed-by: Emil Renner Berthing <emil.renner.berthing@...onical.com>
Powered by blists - more mailing lists