stmmac: fix phy init when attached to a phy
authorFabrice Gasnier <fabrice.gasnier@st.com>
Mon, 29 Feb 2016 13:27:40 +0000 (14:27 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Mar 2016 19:21:33 +0000 (14:21 -0500)
commit8ecd80a5f6a7e31824c0d49e10c3cf6825c6c291
tree429147aa00aff247a479792f3dfa970997cd005b
parent8e99fc5f887a072ee023eb9a3240eba85e768734
stmmac: fix phy init when attached to a phy

phy_bus_name can be NULL when "fixed-link" property isn't used.
Then, since "stmmac: do not poll phy handler when attach a switch",
phy_bus_name ptr needs to be checked before strcmp is called.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: Alexandre TORGUE <alexandre.torgue@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c