Re: [PATCH net-next 1/2] net: stmmac: dwmac-starfive: improve error handling during probe
From: Emil Renner Berthing
Date: Sun Aug 27 2023 - 13:36:35 EST
On Sun, 27 Aug 2023 at 15:59, Russell King (Oracle)
<linux@xxxxxxxxxxxxxxx> wrote:
> 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?
+1. Using devm_stmmac_probe_config_dt() seems like a better solution.
> --
> RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!