]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: phy: bcm84881: Fix some error handling paths
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 3 Oct 2024 19:03:21 +0000 (21:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:11:54 +0000 (15:11 +0200)
commit5f14a2d06a8a94c79139ca576ec6163c5d9bd680
treeb9befb9f2460c907d95087a1f6edb914017edbee
parent496b2ab0fd10f205e08909a125485fdc98843dbe
net: phy: bcm84881: Fix some error handling paths

[ Upstream commit 9234a2549cb6ac038bec36cc7c084218e9575513 ]

If phy_read_mmd() fails, the error code stored in 'bmsr' should be returned
instead of 'val' which is likely to be 0.

Fixes: 75f4d8d10e01 ("net: phy: add Broadcom BCM84881 PHY driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://patch.msgid.link/3e1755b0c40340d00e089d6adae5bca2f8c79e53.1727982168.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/phy/bcm84881.c