net: zynq_gem: Initialize val variable in zynq_gem_miiphy_read()
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>
This commit is contained in:
parent
ac378bb05f
commit
d1b226b7d4
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user