Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e214ad8 authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller
Browse files

USB: mcs7830: return negative if auto negotiate fails



The original code returns 0 on success and 1 on failure.  In fact, at
this point, "ret" is already either zero or a negative error code so
we can just return it directly.

Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fdac1e06
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -355,7 +355,7 @@ static int mcs7830_set_autoneg(struct usbnet *dev, int ptrUserPhyMode)
	if (!ret)
	if (!ret)
		ret = mcs7830_write_phy(dev, MII_BMCR,
		ret = mcs7830_write_phy(dev, MII_BMCR,
				BMCR_ANENABLE | BMCR_ANRESTART	);
				BMCR_ANENABLE | BMCR_ANRESTART	);
	return ret < 0 ? : 0;
	return ret;
}
}