在 2026/9/2 14:58, Donggeun Yoo 写道:
dp83848_config_init() reads BMCR to detect whether auto-negotiation is
enabled, but does not check the phy_read() return value. On an MDIO read
failure phy_read() returns a negative errno, which is then used directly
in a bitwise test; the auto-negotiation state is left undefined while
config_init() still reports success.
Check the return value and propagate the error.
Fixes: b718e8c8f4f5 ("net: phy: dp83822: use BMCR_ANENABLE instead of BMSR_ANEGCAPABLE for DP83620")
Signed-off-by: Donggeun Yoo <redacted>
Reviewed-by: Xuanqiang Luo <redacted>
Thanks,
Xuanqiang