提交 52cb1c2b 编写于 作者: A Andy Fleming 提交者: Jeff Garzik

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: NAndy Fleming <afleming@freescale.com>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 fe6d3a40
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册