]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: Fix NULL checking in dsa_slave_set_eee()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 6 Feb 2019 15:35:15 +0000 (18:35 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Feb 2019 21:42:54 +0000 (13:42 -0800)
commitdbea9617d50f92bc2645e9041290ce46a5ba944c
treec6ea6278589659c3bbd1144abaf0bde8409382ce
parentf9fa1bf1df8988f06b53aa2cc83ddfa6c64416e6
net: dsa: Fix NULL checking in dsa_slave_set_eee()

This function can't succeed if dp->pl is NULL.  It will Oops inside the
call to return phylink_ethtool_get_eee(dp->pl, e);

Fixes: e484cc6ffd93 ("dsa: slave: eee: Allow ports to use phylink")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Vivien Didelot <vivien.didelot@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/slave.c