Skip to content
Snippets Groups Projects
Commit 52cb1c2b authored by Andy Fleming's avatar Andy Fleming Committed by Jeff Garzik
Browse files

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
No related branches found
No related tags found
No related merge requests found
......@@ -109,7 +109,7 @@ static int vsc824x_config_intr(struct phy_device *phydev)
*/
err = phy_read(phydev, MII_VSC8244_ISTAT);
if (err)
if (err < 0)
return err;
err = phy_write(phydev, MII_VSC8244_IMASK, 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment