net: usb: sr9800: fix uninitialized local variable
authorValentin Vidic <vvidic@valentin-vidic.from.hr>
Tue, 15 Oct 2019 20:20:20 +0000 (22:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Nov 2019 12:06:26 +0000 (13:06 +0100)
commit3ecf8529d52ac62b1224e7c96f52bb059efde057
treed0f6c392995e35d192cc9cf8cec2e0b437634b83
parent14a703ef2dc4671ff8a13a166c98ac6bb7381f72
net: usb: sr9800: fix uninitialized local variable

commit 77b6d09f4ae66d42cd63b121af67780ae3d1a5e9 upstream.

Make sure res does not contain random value if the call to
sr_read_cmd fails for some reason.

Reported-by: syzbot+f1842130bbcfb335bac1@syzkaller.appspotmail.com
Signed-off-by: Valentin Vidic <vvidic@valentin-vidic.from.hr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/usb/sr9800.c