Re: [PATCH net v4 5/6] net: phy: propagate errors from default port setup
From: Xuanqiang Luo
Date: Fri Aug 21 2026 - 06:07:18 EST
在 2026/8/21 15:03, Xuanqiang Luo 写道:
From: Xuanqiang Luo <luoxuanqiang@xxxxxxxxxx>
phy_default_setup_single_port() ignores errors from phy_add_port() and
always reports success. If a PHY driver attach_mdi_port() callback fails,
the phy_port is leaked and PHY probing continues without the expected
default port.
Destroy the port and return the error.
Fixes: 589e934d2735 ("net: phy: Introduce PHY ports representation")
Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
Signed-off-by: Xuanqiang Luo <luoxuanqiang@xxxxxxxxxx>
I realized I made a mistake.
The Reviewed-by tag added to patch 5/6 should be:
Maxime Chevallier <maxime.chevallier@xxxxxxxxxxx>
rather than:
Andrew Lunn <andrew@xxxxxxx>
Sorry for the mistake. I will send a corrected version after 24 hours.
Thanks,
Xuanqiang