projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
63c6f1c
)
net: phy: mv88e61xx: Fix uninitialized variable warning
author
Tom Rini
<
[email protected]
>
Tue, 9 May 2017 02:14:32 +0000
(22:14 -0400)
committer
Tom Rini
<
[email protected]
>
Fri, 12 May 2017 12:37:30 +0000
(08:37 -0400)
The variable 'res' may be unused uninitialized if our call to
mv88e61xx_port_read (register read) fails and we goto the error
handling section. In this case we set 'res' to -EIO to indicate why we
failed.
Cc: Joe Hershberger <
[email protected]
>
Cc: Chris Packham <
[email protected]
>
Cc: Kevin Smith <
[email protected]
>
Cc: Prafulla Wadaskar <
[email protected]
>
Signed-off-by: Tom Rini <
[email protected]
>
drivers/net/phy/mv88e61xx.c
patch
|
blob
|
history
diff --git
a/drivers/net/phy/mv88e61xx.c
b/drivers/net/phy/mv88e61xx.c
index a2fd1686fc3b8366aec9ddf7673fee4ee4b9f182..3d2f6b98ad0e3212f3a181bd15752446ba647819 100644
(file)
--- a/
drivers/net/phy/mv88e61xx.c
+++ b/
drivers/net/phy/mv88e61xx.c
@@
-655,8
+655,10
@@
static int mv88e61xx_read_port_config(struct phy_device *phydev, u8 port)
do {
val = mv88e61xx_port_read(phydev, port,
PORT_REG_STATUS);
- if (val < 0)
+ if (val < 0) {
+ res = -EIO;
goto unforce;
+ }
if (val & PORT_REG_STATUS_LINK)
break;
} while (--timeout);