[PATCH v2] clk: mediatek: mt6735: Unregister PLLs on probe failure
Brian Masney
bmasney at redhat.com
Mon Jul 6 13:27:23 PDT 2026
On Wed, Jun 24, 2026 at 03:23:55PM +0900, Myeonghun Pak wrote:
> mtk_clk_register_plls() registers the apmixedsys PLL clocks manually, while
> clk_mt6735_apmixed_remove() unregisters them on driver removal.
>
> If devm_of_clk_add_hw_provider() fails after the PLL registration succeeds,
> probe returns the error directly and the remove callback is not run. This
> leaves the registered PLL clocks behind on the probe failure path.
>
> Unregister the PLLs in that failure branch before returning the error.
>
> Fixes: 43c04ed79189 ("clk: mediatek: Add drivers for MediaTek MT6735 main clock and reset drivers")
> Co-developed-by: Ijae Kim <ae878000 at gmail.com>
> Signed-off-by: Ijae Kim <ae878000 at gmail.com>
> Signed-off-by: Myeonghun Pak <mhun512 at gmail.com>
Reviewed-by: Brian Masney <bmasney at redhat.com>
More information about the linux-arm-kernel
mailing list