net: usb: pegasus: fix improper read if get_registers() fail
commit58c33d479defa1ad1a1d0e26910964e98ee5caa1
authorDenis Kirjanov <kda@linux-powerpc.org>
Tue, 30 Jul 2019 13:13:57 +0000 (30 15:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Aug 2019 08:51:45 +0000 (25 10:51 +0200)
tree08295cee9a211fca16a9eaa4eb33363179b6374f
parentb8cab0b87c0195620f825f567f40ffe135f58af8
net: usb: pegasus: fix improper read if get_registers() fail

commit 224c04973db1125fcebefffd86115f99f50f8277 upstream.

get_registers() may fail with -ENOMEM and in this
case we can read a garbage from the status variable tmp.

Reported-by: syzbot+3499a83b2d062ae409d4@syzkaller.appspotmail.com
Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/usb/pegasus.c