From: Andy Fleming Date: Wed, 18 Jul 2007 06:06:28 +0000 (-0500) Subject: Fix error checking in Vitesse IRQ config X-Git-Tag: v2.6.23-rc2~293^2~7 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=52cb1c2b70d9d2a81e842b90456b7a8158541ffd;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/phy/vitesse.c b/drivers/net/phy/vitesse.c index 6a538564791..8874497b6bb 100644 --- a/drivers/net/phy/vitesse.c +++ b/drivers/net/phy/vitesse.c @@ -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);