aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/phylink.c
diff options
context:
space:
mode:
authorAlex Marginean <alexandru.marginean@nxp.com>2020-01-16 19:46:28 +0200
committerDavid S. Miller <davem@davemloft.net>2020-01-20 10:08:20 +0100
commit3e41d04e2b7373490977d7145fb12109f23cde9c (patch)
treeef84fc515320be248eca978320a1052726605226 /drivers/net/phy/phylink.c
parentnet: phylink: Allow 2.5BASE-T, 5GBASE-T and 10GBASE-T for the 10G link modes (diff)
downloadlinux-dev-3e41d04e2b7373490977d7145fb12109f23cde9c.tar.xz
linux-dev-3e41d04e2b7373490977d7145fb12109f23cde9c.zip
net: phy: don't crash in phy_read/_write_mmd without a PHY driver
The APIs can be used by Ethernet drivers without actually loading a PHY driver. This may become more widespread in the future with 802.3z compatible MAC PCS devices being locally driven by the MAC driver when configuring for a PHY mode with in-band negotiation. Check that drv is not NULL before reading from it. Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/phylink.c')
0 files changed, 0 insertions, 0 deletions