Re: [PATCH RESEND] net: ethernet: ti: cpts: drop the refclk mux node reference
From: Krzysztof Kozlowski
Date: Tue Nov 03 2026 - 06:07:38 EST
On 03/11/2026 11:29, Wentao Liang wrote:
> cpts_of_mux_clk_setup() obtains refclk_np with of_get_child_by_name()
> and only drops that reference on the error path. of_clk_add_hw_provider()
> takes its own reference through of_node_get(), which
> of_clk_del_provider() releases later, so the reference taken by
> of_get_child_by_name() is leaked when the mux clock is registered
> successfully.
>
> Drop the caller's reference once the provider has been registered and
> its devm cleanup action is in place.
>
> Fixes: a3047a81ba13 ("net: ethernet: ti: cpts: add support for ext rftclk selection")
> Cc: stable@xxxxxxxxxxxxxxx
> Assisted-by: DeepSeek-V4.1-Flash and OpenAI Codex
> Signed-off-by: Wentao Liang <vulab@xxxxxxxxxxx>
Implement comments you received, instead of resending.
Best regards,
Krzysztof