]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
Fix error checking in Vitesse IRQ config
authorAndy Fleming <afleming@freescale.com>
Wed, 18 Jul 2007 06:06:28 +0000 (01:06 -0500)
committerJeff Garzik <jeff@garzik.org>
Tue, 24 Jul 2007 20:28:41 +0000 (16:28 -0400)
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>
drivers/net/phy/vitesse.c

index 6a53856479114c33fc8cf47e7d76ad0d814ff55e..8874497b6bbfa76384c42bdfc4af9903991af497 100644 (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);