[PATCH net-next 01/12] net: dsa: bcm_sf2: Convert using devm_clk_get_optional_enabled() in bcm_sf2_sw_probe()
Florian Fainelli
florian.fainelli at broadcom.com
Mon Sep 2 08:20:35 PDT 2024
On 8/30/2024 7:13 PM, Li Zetao wrote:
> Use devm_clk_get_optional_enabled() instead of devm_clk_get_optional() +
> clk_prepare_enable(), which can make the clk consistent with the device
> life cycle and reduce the risk of unreleased clk resources. Since the
> device framework has automatically released the clk resource, there is
> no need to execute clk_disable_unprepare(clk) on the error path, drop
> the out_clk_mdiv and out_clk labels, and the original error process can
> be returned directly.
>
> Signed-off-by: Li Zetao <lizetao1 at huawei.com>
Acked-by: Florian Fainelli <florian.fainelli at broadcom.com>
--
Florian
More information about the Linux-rockchip
mailing list