Re: [PATCH net-next] bcm63xx_enet: Use devm_clk_get_enabled() in two probe functions

From: Andy Shevchenko

Date: Tue Nov 24 2026 - 15:20:57 EST


On Tue, Nov 24, 2026 at 08:23:24PM +0100, Markus Elfring wrote:
>
> * Reuse existing functionality from devm_clk_get_enabled() instead of
> keeping duplicate source code.
>
> * Omit a clk_disable_unprepare() call on error handling paths
> and in the implementation of two remove functions.
>
> * Omit two labels.
>
> This issue was detected by using the Coccinelle software.

...

> -out_disable_clk_mac:
> - clk_disable_unprepare(priv->mac_clk);
> out:
> free_netdev(dev);
> return ret;

Does this have side effects due to order changes? Same Q for the remove stage.

...

> - /* disable hw block clocks */

Why drop this comment?

> clk_disable_unprepare(priv->phy_clk);
> - clk_disable_unprepare(priv->mac_clk);

--
With Best Regards,
Andy Shevchenko