net: phy: Do not warn in phy_stop() on PHY_DOWN
authorFlorian Fainelli <f.fainelli@gmail.com>
Thu, 17 Sep 2020 03:43:10 +0000 (20:43 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Sep 2020 16:05:26 +0000 (18:05 +0200)
commit410c186dc45eddf7383770cc10686bb9b17a0a39
treea7eeeb022bb6e1cedebf4a152454acc3f954ed67
parent3fa1f8461a5d60653f0c2f8cdf583b556d66a052
net: phy: Do not warn in phy_stop() on PHY_DOWN

[ Upstream commit 5116a8ade333b6c2e180782139c9c516a437b21c ]

When phy_is_started() was added to catch incorrect PHY states,
phy_stop() would not be qualified against PHY_DOWN. It is possible to
reach that state when the PHY driver has been unbound and the network
device is then brought down.

Fixes: 2b3e88ea6528 ("net: phy: improve phy state checking")
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>
drivers/net/phy/phy.c