mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-28 15:20:41 +00:00
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: Dan Carpenter <error27@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
fdac1e0697
commit
0e214ad815
1 changed files with 1 additions and 1 deletions
|
@ -355,7 +355,7 @@ static int mcs7830_set_autoneg(struct usbnet *dev, int ptrUserPhyMode)
|
|||
if (!ret)
|
||||
ret = mcs7830_write_phy(dev, MII_BMCR,
|
||||
BMCR_ANENABLE | BMCR_ANRESTART );
|
||||
return ret < 0 ? : 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue