Skip to content
Snippets Groups Projects
Commit f0ece9e9 authored by Mike Frysinger's avatar Mike Frysinger Committed by Wolfgang Denk
Browse files

net: designware: fix uninitialized phy_addr usage


When CONFIG_DW_SEARCH_PHY is disabled, the local phy_addr variable
never gets initialized which causes random behavior at runtime and a
gcc warning.  So set it by default to the stored phy address.

Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
Reviewed-by: default avatarVipin Kumar <vipin.kumar@st.com>

Fix commit message.
Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
parent ee7f5bfd
No related branches found
No related tags found
No related merge requests found
......@@ -383,6 +383,8 @@ static int configure_phy(struct eth_device *dev)
priv->address = phy_addr;
else
return -1;
#else
phy_addr = priv->address;
#endif
if (dw_reset_phy(dev) < 0)
return -1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment