Re: [PATCH] net: allwinner: Use devm_clk_get_enabled() in emac_probe()
From: Andy Shevchenko
Date: Tue Nov 24 2026 - 15:17:46 EST
On Tue, Nov 24, 2026 at 06:19:54PM +0100, Markus Elfring wrote:
>
> * Reuse existing functionality from devm_clk_get_enabled() instead of
> keeping duplicate source code.
>
> * Delete a clk_disable_unprepare() call on an error handling path
> and in the implementation of the function “emac_remove”.
>
> * Omit the label “out_clk_disable_unprepare”.
>
> This issue was detected by using the Coccinelle software.
This breaks the order at remove and probe error path cases.
Note, devm_*() at this case will keep just a clk object, but
the actual enabling is done explicitly. W/o testing on real
HW it's hard to say if this order is strict or not.
--
With Best Regards,
Andy Shevchenko