[PATCH net-next 1/2] net: stmmac: dwmac-starfive: improve error handling during probe
Emil Renner Berthing
kernel at esmil.dk
Sun Aug 27 10:35:41 PDT 2023
On Sun, 27 Aug 2023 at 15:59, Russell King (Oracle)
<linux at armlinux.org.uk> 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!
More information about the linux-arm-kernel
mailing list