net: dsa: Fix NULL checking in dsa_slave_set_eee()
commit620f1379a59c039d0b9bd99ebcc8d6d50cba6386
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 6 Feb 2019 15:35:15 +0000 (6 18:35 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 19:02:32 +0000 (12 20:02 +0100)
treed36052411527df524ec22b37b7edd3e819f7881c
parent324153413903e5cf009080a3eacf5ba44b397318
net: dsa: Fix NULL checking in dsa_slave_set_eee()

[ Upstream commit 00670cb8a73b10b10d3c40f045c15411715e4465 ]

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: 1be52e97ed3e ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/dsa/slave.c