]> www.infradead.org Git - users/hch/configfs.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)
committerJakub Kicinski <kuba@kernel.org>
Fri, 4 Oct 2024 23:19:00 +0000 (16:19 -0700)
commit9234a2549cb6ac038bec36cc7c084218e9575513
treed0be179769b33bd678a75ff2fb13ce9f85f531dc
parent1dae9f1187189bc09ff6d25ca97ead711f7e26f9
net: phy: bcm84881: Fix some error handling paths

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>
drivers/net/phy/bcm84881.c