Re: [PATCH v2] net: usb: dm9601: fix uninitialized variable use in dm9601_mdio_read

From: patchwork-bot+netdevbpf
Date: Tue Oct 10 2023 - 23:10:31 EST


Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@xxxxxxxxxx>:

On Tue, 10 Oct 2023 00:26:14 +0200 you wrote:
> syzbot has found an uninit-value bug triggered by the dm9601 driver [1].
>
> This error happens because the variable res is not updated if the call
> to dm_read_shared_word returns an error. In this particular case -EPROTO
> was returned and res stayed uninitialized.
>
> This can be avoided by checking the return value of dm_read_shared_word
> and propagating the error if the read operation failed.
>
> [...]

Here is the summary with links:
- [v2] net: usb: dm9601: fix uninitialized variable use in dm9601_mdio_read
https://git.kernel.org/netdev/net/c/8f8abb863fa5

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html