Commit 52cb1c2b authored by Andy Fleming's avatar Andy Fleming Committed by Jeff Garzik

Fix error checking in Vitesse IRQ config

phy_read() returns a negative number if there's an error, but the
error-checking code in the Vitesse driver's config_intr function
triggers if phy_read() returns non-zero.  Correct that.
Signed-off-by: default avatarAndy Fleming <afleming@freescale.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent fe6d3a40
...@@ -109,7 +109,7 @@ static int vsc824x_config_intr(struct phy_device *phydev) ...@@ -109,7 +109,7 @@ static int vsc824x_config_intr(struct phy_device *phydev)
*/ */
err = phy_read(phydev, MII_VSC8244_ISTAT); err = phy_read(phydev, MII_VSC8244_ISTAT);
if (err) if (err < 0)
return err; return err;
err = phy_write(phydev, MII_VSC8244_IMASK, 0); err = phy_write(phydev, MII_VSC8244_IMASK, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment