Re: [PATCH net] net: qcom/emac: Fix missing clk_disable_unprepare() in error path of emac_probe
From: Timur Tabi
Date: Thu Aug 06 2020 - 13:32:12 EST
On 8/6/20 9:06 AM, Wang Hai wrote:
In emac_clks_phase1_init() of emac_probe(), there may be a situation
in which some clk_prepare_enable() succeed and others fail.
If emac_clks_phase1_init() fails, goto err_undo_clocks to clean up
the clk that was successfully clk_prepare_enable().
Good catch, however, I think the proper fix is to fix this in
emac_clks_phase1_init(), so that if some clocks fail, the other clocks
are cleaned up and then an error is returned.