mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
53013c7743
In case there is no PHY at the designated address on the internal
switch, we would basically de-reference a null pointer here:
dsa_slave_phy_setup(...)
{
p->phy = ds->slave_mii_bus->phy_map[p->port];
phy_connect_direct(slave_dev, p->phy, dsa_slave_adjust_link,
^------
This can be triggered when the platform configuration (platform_data or
Device Tree) indicates there should be a PHY device at this address, but
the HW is non-responsive, such that we cannot attach a PHY device at
this specific location.
Fix this by checking the return value prior to calling
phy_connect_direct().
CC: Andrew Lunn <andrew@lunn.ch>
Fixes:
|
||
---|---|---|
.. | ||
dsa.c | ||
dsa_priv.h | ||
Kconfig | ||
Makefile | ||
slave.c | ||
tag_brcm.c | ||
tag_dsa.c | ||
tag_edsa.c | ||
tag_trailer.c |