Skip to content

Commit

Permalink
USB: mcs7830: return negative if auto negotiate fails
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Dec 23, 2010
1 parent fdac1e0 commit 0e214ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/usb/mcs7830.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}


Expand Down

0 comments on commit 0e214ad

Please sign in to comment.