From: Andrew Lunn Date: Sun, 19 Oct 2014 14:41:47 +0000 (+0200) Subject: Net: DSA: Fix checking for get_phy_flags function X-Git-Tag: fixes-against-v3.18-rc2~39^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=228b16cb13dfa2f77354a9b144a07e86e2dda01c;p=pandora-kernel.git 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: Andrew Lunn Fixes: 6819563e646a ("net: dsa: allow switch drivers to specify phy_device::dev_flags") Cc: Florian Fainelli Signed-off-by: David S. Miller --- Reading git-diff-tree failed