diff --git a/drivers/net/phy/mdio-xpcs.c b/drivers/net/phy/mdio-xpcs.c index 2f4cdf807160e835b12cdf6538226ac16497c604..c04e9bf401806986f9fcf2b39b8caff52b9b27de 100644 --- a/drivers/net/phy/mdio-xpcs.c +++ b/drivers/net/phy/mdio-xpcs.c @@ -255,8 +255,10 @@ static int xpcs_read_fault(struct mdio_xpcs_args *xpcs, if (ret < 0) return ret; - if (ret & MDIO_PCS_10GBRT_STAT2_ERR) + if (ret & MDIO_PCS_10GBRT_STAT2_ERR) { xpcs_warn(xpcs, state, "Link has errors!\n"); + return -EFAULT; + } return 0; }