net: usb: rtl8150 fix unintiatilzed variables in rtl8150_get_link_ksettings
Subsystems (5)
PATCH 1/1 net: usb: rtl8150 fix unintiatilzed variables in rtl8150_get_link_ksettings
This functions retrieves values by passing a pointer. As the function that retrieves them can fail before touching the pointers, the variables must be initialized.
--- drivers/net/usb/rtl8150.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/usb/rtl8150.c +2 -1
@@ -778,7 +778,8 @@ static int rtl8150_get_link_ksettings(struct net_device *netdev, struct ethtool_link_ksettings *ecmd) {rtl8150_t *dev =netdev_priv (netdev); -short lpa, bmcr; +short lpa =0 ; +short bmcr =0 ;u32 supported; supported = (SUPPORTED_10baseT_Half |
Signature · 1 line
2.45.1
Petko Manolov
maintainerQuoted 3 lines · Oliver Neukum
This functions retrieves values by passing a pointer. As the function that retrieves them can fail before touching the pointers, the variables must be initialized.
ACK.
Petko
Quoted 24 lines
Reported-by [email protected]Signed-off-by Oliver Neukum <[email protected]>--- drivers/net/usb/rtl8150.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/net/usb/rtl8150.c +2
-1@@ -778,7 +778,8 @@ static int rtl8150_get_link_ksettings(struct net_device *netdev, struct ethtool_link_ksettings *ecmd) {rtl8150_t *dev =netdev_priv (netdev); -short lpa, bmcr; +short lpa =0 ; +short bmcr =0 ;u32 supported; supported = (SUPPORTED_10baseT_Half |Signature · 1 line
2.45.1
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Wed, 19 Jun 2024 15:28:03 +0200 you wrote:
This functions retrieves values by passing a pointer. As the function that retrieves them can fail before touching the pointers, the variables must be initialized.
Reported-by [email protected]Signed-off-by Oliver Neukum <[email protected]>[...]
Here is the summary with links:
- [net] net: usb: rtl8150 fix unintiatilzed variables in rtl8150_get_link_ksettings
https://git.kernel.org/netdev/net/c/fba383985354
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html