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
Also in
kernel-janitors, lkml
Reply to
Markus Elfring, 2026-11-24
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.
...
quoted hunk ↗ jump to hunk
-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

Thread (15 messages) 15 messages, 4 authors, last reply 4d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help