kernel-fxtec-pro1x/net/dsa
Vladimir Oltean 7245f45625 net: dsa: Avoid null pointer when failing to connect to PHY
[ Upstream commit 6146dd453e235c487d85ae4dc6cc08978a1c890f ]

When phylink_of_phy_connect fails, dsa_slave_phy_setup tries to save the
day by connecting to an alternative PHY, none other than a PHY on the
switch's internal MDIO bus, at an address equal to the port's index.

However this does not take into consideration the scenario when the
switch that failed to probe an external PHY does not have an internal
MDIO bus at all.

Fixes: aab9c4067d ("net: dsa: Plug in PHYLINK support")
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-27 14:50:34 +01:00
..
dsa.c
dsa2.c
dsa_priv.h
Kconfig
legacy.c
Makefile
master.c
port.c net: dsa: fix unintended change of bridge interface STP state 2020-01-27 14:50:26 +01:00
slave.c net: dsa: Avoid null pointer when failing to connect to PHY 2020-01-27 14:50:34 +01:00
switch.c
tag_brcm.c
tag_dsa.c
tag_edsa.c
tag_ksz.c
tag_lan9303.c
tag_mtk.c
tag_qca.c net: dsa: tag_qca: fix doubled Tx statistics 2020-01-23 08:21:35 +01:00
tag_trailer.c