Commit c84788ca authored by Heiner Kallweit's avatar Heiner Kallweit Committed by sanglipeng
Browse files

net: phy: smsc: bail out in lan87xx_read_status if genphy_read_status fails

stable inclusion
from stable-v5.10.176
commit 194248138f8da8a74cbdc359fb5e5a7b116f35da
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I87BGI

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=194248138f8da8a74cbdc359fb5e5a7b116f35da



--------------------------------

[ Upstream commit c22c3bbf ]

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: 4223dbff ("net: phy: smsc: Re-enable EDPD mode for LAN87xx")
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/026aa4f2-36f5-1c10-ab9f-cdb17dda6ac4@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 29f92ff8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment