diff options
author | Michal Simek <michal.simek@xilinx.com> | 2018-06-13 10:33:49 +0200 |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2018-06-13 13:54:18 -0500 |
commit | 7674b64d788e0e7a65f26a1cc81d583a54987282 (patch) | |
tree | 13d7c870fc9965a4bba194284100cfc172e9e272 | |
parent | b33d4a5fc7d2c67d11d936351c05856f0696d306 (diff) | |
download | u-boot-7674b64d788e0e7a65f26a1cc81d583a54987282.tar.gz u-boot-7674b64d788e0e7a65f26a1cc81d583a54987282.tar.xz u-boot-7674b64d788e0e7a65f26a1cc81d583a54987282.zip |
net: zynq_gem: Initialize phyreg variable
In case of phyread()/phy_setup_op() timeout code is working with
uninitialized phyreg variable. Initialize this variable to make sure
that code it not working with random value.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
-rw-r--r-- | drivers/net/zynq_gem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c index d1436807ff..14564e365e 100644 --- a/drivers/net/zynq_gem.c +++ b/drivers/net/zynq_gem.c @@ -244,7 +244,7 @@ static int phywrite(struct zynq_gem_priv *priv, u32 phy_addr, static int phy_detection(struct udevice *dev) { int i; - u16 phyreg; + u16 phyreg = 0; struct zynq_gem_priv *priv = dev->priv; if (priv->phyaddr != -1) { |