Re: [PATCH net v3 4/5] net: phy: call driver remove when core initialization fails

From: Andrew Lunn

Date: Wed Aug 19 2026 - 09:43:22 EST


On Wed, Aug 19, 2026 at 02:02:35PM +0800, Xuanqiang Luo wrote:
> From: Xuanqiang Luo <luoxuanqiang@xxxxxxxxxx>
>
> phy_probe() may fail while querying features or completing other core
> initialization after the PHY driver probe callback has succeeded. The
> driver core does not run the remove path after a probe error, so
> resources that the PHY driver releases in its remove callback are
> leaked.
>
> Call the PHY driver remove callback on these failures.
>
> Fixes: efbdfdc29bdd ("net: phy: Add support for asking the PHY its abilities")
> Signed-off-by: Xuanqiang Luo <luoxuanqiang@xxxxxxxxxx>

Reviewed-by: Andrew Lunn <andrew@xxxxxxx>

Andrew