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: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
Andy Fleming 2007-07-18 01:06:28 -05:00 committed by Jeff Garzik
parent fe6d3a4049
commit 52cb1c2b70

View File

@ -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);