# Re: \[PATCH net-next\] bcm63xx\_enet: Use devm\_clk\_get\_enabled() in two probe functions

- From: Andy Shevchenko \<andriy.shevchenko@linux.intel.com\>
- Date: 2026-11-24 20:20:44 
- List: netdev
- Page: https://ratatoskr.run/netdev/2026/11/18015504
- Thread: https://ratatoskr.run/netdev/2026/11/18015206/t.md

```text
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


```
