Skip to content

Commit

Permalink
net: usb: rtl8150 fix unintiatilzed variables in rtl8150_get_link_kse…
Browse files Browse the repository at this point in the history
…ttings

[ Upstream commit fba3839 ]

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: 1da177e ("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>
  • Loading branch information
oneukum authored and gregkh committed Jul 5, 2024
1 parent 72d9611 commit 6a0f5d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/usb/rtl8150.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down

0 comments on commit 6a0f5d5

Please sign in to comment.