mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
net: phy: dp83848: check phy_read() return value in config_init()
dp83848_config_init() reads BMCR to detect whether auto-negotiation is enabled, but does not check the phy_read() return value. On an MDIO read failure phy_read() returns a negative errno, which is then used directly in a bitwise test; the auto-negotiation state is left undefined while config_init() still reports success. Check the return value and propagate the error. Cc: stable+noautosel@kernel.org # untested fix to unlikely driver error path Signed-off-by: Donggeun Yoo <donggeunyoo.kernel@gmail.com> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Reviewed-by: Xuanqiang Luo <luoxuanqiang@kylinos.cn> Link: https://patch.msgid.link/20260902065828.1031113-1-donggeunyoo.kernel@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
e84b89f17a
commit
8c9190bfd1
1 changed files with 3 additions and 0 deletions
Loading…
Add table
Add a link
Reference in a new issue