mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
The check for the presence or not of the optional switch function
get_phy_flags() called the function, rather than checked to see if it
is a NULL pointer. This causes a derefernce of a NULL pointer on all
switch chips except the sf2, the only switch to implement this call.
Signed-off-by: Andrew Lunn <[email protected]>
Fixes: 6819563e64 ("net: dsa: allow switch drivers to specify phy_device::dev_flags")
Cc: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>