diff --git a/drivers/net/phy/aquantia_main.c b/drivers/net/phy/aquantia_main.c index 345f70f9d39b..968dd43a2b1e 100644 --- a/drivers/net/phy/aquantia_main.c +++ b/drivers/net/phy/aquantia_main.c @@ -250,7 +250,7 @@ static int aqr_config_intr(struct phy_device *phydev) if (en) { /* Clear any pending interrupts before enabling them */ err = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_TX_VEND_INT_STATUS2); - if (err) + if (err < 0) return err; } @@ -273,7 +273,7 @@ static int aqr_config_intr(struct phy_device *phydev) if (!en) { /* Clear any pending interrupts after we have disabled them */ err = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_TX_VEND_INT_STATUS2); - if (err) + if (err < 0) return err; }