]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: smsc: bail out in lan87xx_read_status if genphy_read_status fails
authorHeiner Kallweit <hkallweit1@gmail.com>
Sat, 11 Mar 2023 18:34:45 +0000 (19:34 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Mar 2023 12:28:05 +0000 (13:28 +0100)
commitc3c4d1f5318b516f5bb7f5811a367d376a90fe9e
tree2c0f89fc756464d59395b935d0a611b0ff29dc89
parent915fac1b0c31482f34a232458702139e581a276b
net: phy: smsc: bail out in lan87xx_read_status if genphy_read_status fails

[ Upstream commit c22c3bbf351e4ce905f082649cffa1ff893ea8c1 ]

If genphy_read_status fails then further access to the PHY may result
in unpredictable behavior. To prevent this bail out immediately if
genphy_read_status fails.

Fixes: 1dab61124363 ("net: phy: smsc: Re-enable EDPD mode for LAN87xx")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/026aa4f2-36f5-1c10-ab9f-cdb17dda6ac4@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/phy/smsc.c