mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-10-01 09:00:45 +09:00
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>
This commit is contained in:
parent
b33d4a5fc7
commit
7674b64d78
@ -244,7 +244,7 @@ static int phywrite(struct zynq_gem_priv *priv, u32 phy_addr,
|
|||||||
static int phy_detection(struct udevice *dev)
|
static int phy_detection(struct udevice *dev)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
u16 phyreg;
|
u16 phyreg = 0;
|
||||||
struct zynq_gem_priv *priv = dev->priv;
|
struct zynq_gem_priv *priv = dev->priv;
|
||||||
|
|
||||||
if (priv->phyaddr != -1) {
|
if (priv->phyaddr != -1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user