mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-16 07:35:14 +00:00
net: usb: rtl8150 fix unintiatilzed variables in rtl8150_get_link_ksettings
[ Upstream commitfba3839853
] 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. Fixes:1da177e4c3
("Linux-2.6.12-rc2") Reported-by: syzbot+5186630949e3c55f0799@syzkaller.appspotmail.com Signed-off-by: Oliver Neukum <oneukum@suse.com> Link: https://lore.kernel.org/r/20240619132816.11526-1-oneukum@suse.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
ad22071b8e
commit
7bcca7108c
1 changed files with 2 additions and 1 deletions
|
@ -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 |
|
||||
|
|
Loading…
Reference in a new issue