Skip to content

Commit

Permalink
Fix error checking in Vitesse IRQ config
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andy Fleming authored and Jeff Garzik committed Jul 24, 2007
1 parent fe6d3a4 commit 52cb1c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/phy/vitesse.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 52cb1c2

Please sign in to comment.