projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fdac1e0
)
USB: mcs7830: return negative if auto negotiate fails
author
Dan Carpenter
<
[email protected]
>
Fri, 17 Dec 2010 03:25:43 +0000
(
03:25
+0000)
committer
David S. Miller
<
[email protected]
>
Thu, 23 Dec 2010 18:21:12 +0000
(10:21 -0800)
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 <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/usb/mcs7830.c
patch
|
blob
|
history
diff --git
a/drivers/net/usb/mcs7830.c
b/drivers/net/usb/mcs7830.c
index b701f593cd59eabffe3b67e4e7706494b5309649..2b791392e788ef893657d04056df673fc3ded672 100644
(file)
--- 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;
}