diff options
author | Andy Fleming <afleming@freescale.com> | 2007-07-18 02:06:28 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-07-24 16:28:41 -0400 |
commit | 52cb1c2b70d9d2a81e842b90456b7a8158541ffd (patch) | |
tree | 82ad0bd34225bd2b2b02e461d7941d7fe2c46543 /drivers/net | |
parent | fe6d3a4049ec9d859d75ddfcc6865a0f58178924 (diff) |
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/phy/vitesse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/phy/vitesse.c b/drivers/net/phy/vitesse.c index 6a5385647911..8874497b6bbf 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) | |||
109 | */ | 109 | */ |
110 | err = phy_read(phydev, MII_VSC8244_ISTAT); | 110 | err = phy_read(phydev, MII_VSC8244_ISTAT); |
111 | 111 | ||
112 | if (err) | 112 | if (err < 0) |
113 | return err; | 113 | return err; |
114 | 114 | ||
115 | err = phy_write(phydev, MII_VSC8244_IMASK, 0); | 115 | err = phy_write(phydev, MII_VSC8244_IMASK, 0); |