projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac378bb
)
net: zynq_gem: Initialize val variable in zynq_gem_miiphy_read()
author
Michal Simek
<michal.simek@xilinx.com>
Thu, 14 Jun 2018 07:08:44 +0000
(09:08 +0200)
committer
Joe Hershberger
<joe.hershberger@ni.com>
Mon, 2 Jul 2018 19:14:19 +0000
(14:14 -0500)
phyread can timeout and val will contain random value. Initialize it to
zero not to report random value in case of error.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/zynq_gem.c
patch
|
blob
|
history
diff --git
a/drivers/net/zynq_gem.c
b/drivers/net/zynq_gem.c
index a817f2e5d69ba247430a1f6e7316d0341d4d7941..d1138fe0903df9745811917d38526b04c96c4bb3 100644
(file)
--- a/
drivers/net/zynq_gem.c
+++ b/
drivers/net/zynq_gem.c
@@
-609,7
+609,7
@@
static int zynq_gem_miiphy_read(struct mii_dev *bus, int addr,
{
struct zynq_gem_priv *priv = bus->priv;
int ret;
- u16 val;
+ u16 val
= 0
;
ret = phyread(priv, addr, reg, &val);
debug("%s 0x%x, 0x%x, 0x%x, 0x%x\n", __func__, addr, reg, val, ret);