Re: [PATCH net-next 1/2] net: stmmac: dwmac-starfive: improve error handling during probe

From: Russell King (Oracle)
Date: Sun Aug 27 2023 - 10:00:39 EST


On Sun, Aug 27, 2023 at 09:41:49PM +0800, Jisheng Zhang wrote:
> After stmmac_probe_config_dt() succeeds, when error happens later,
> stmmac_remove_config_dt() needs to be called for proper error handling.

Have you thought about converting to use devm_stmmac_probe_config_dt()
which will call stmmac_remove_config_dt() if the probe fails or when
the device is unbound?

--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!