net: usb: pegasus: fix improper read if get_registers() fail
authorDenis Kirjanov <kda@linux-powerpc.org>
Tue, 30 Jul 2019 13:13:57 +0000 (15:13 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Aug 2019 22:18:27 +0000 (18:18 -0400)
commit224c04973db1125fcebefffd86115f99f50f8277
tree8ec9b6aaa1832f9a8bcc57c93a2c95a8af6171aa
parent4da5f0018eef4c0de31675b670c80e82e13e99d1
net: usb: pegasus: fix improper read if get_registers() fail

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>
drivers/net/usb/pegasus.c