Skip to content
Commit 228b16cb authored by Andrew Lunn's avatar Andrew Lunn Committed by David S. Miller
Browse files

Net: DSA: Fix checking for get_phy_flags function



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: default avatarAndrew Lunn <andrew@lunn.ch>
Fixes: 6819563e ("net: dsa: allow switch drivers to specify phy_device::dev_flags")
Cc: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a6d4518d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment