From: Dan Carpenter Date: Fri, 17 Dec 2010 03:25:43 +0000 (+0000) Subject: USB: mcs7830: return negative if auto negotiate fails X-Git-Tag: firefly_0821_release~7613^2~3176^2~4 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0e214ad81545a35c5e62a4c2d6cf7275fd7a545f;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/usb/mcs7830.c b/drivers/net/usb/mcs7830.c index b701f593cd59..2b791392e788 100644 --- a/drivers/net/usb/mcs7830.c +++ b/drivers/net/usb/mcs7830.c @@ -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; }