net: dsa: Do not suspend/resume closed slave_dev
authorFlorian Fainelli <f.fainelli@gmail.com>
Wed, 1 Aug 2018 00:12:52 +0000 (17:12 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Aug 2018 14:23:03 +0000 (16:23 +0200)
commitab9a0f80bce707fa4f8b4d63ad1f3b2a89079caa
tree62779e60e9d2698aec7b675405ffa0b4192a29b4
parentd59dcdf13ee5b27a54940a05474230bda3a50edb
net: dsa: Do not suspend/resume closed slave_dev

[ Upstream commit a94c689e6c9e72e722f28339e12dff191ee5a265 ]

If a DSA slave network device was previously disabled, there is no need
to suspend or resume it.

Fixes: 2446254915a7 ("net: dsa: allow switch drivers to implement suspend/resume hooks")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/dsa/slave.c