[PATCH net] net: stmmac: dwc-qos: fix clk prepare/enable leak on probe failure
Simon Horman
horms at kernel.org
Fri Aug 8 07:22:51 PDT 2025
On Fri, Aug 08, 2025 at 01:16:39PM +0100, Russell King (Oracle) wrote:
> dwc_eth_dwmac_probe() gets bulk clocks, and then prepares and enables
> them. Unfortunately, if dwc_eth_dwmac_config_dt() or stmmac_dvr_probe()
> fail, we leave the clocks prepared and enabled. Fix this by using
> devm_clk_bulk_get_all_enabled() to combine the steps and provide devm
> based release of the prepare and enable state.
>
> This also fixes a similar leakin dwc_eth_dwmac_remove() which wasn't
> correctly retrieving the struct plat_stmmacenet_data. This becomes
> unnecessary.
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
Thanks Russell,
Probably this wants:
Fixes: a045e40645df ("net: stmmac: refactor clock management in EQoS driver")
Otherwise looks good to me.
Reviewed-by: Simon Horman <horms at kernel.org>
More information about the linux-arm-kernel
mailing list