]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
staging: vt6656: Fix non zero logical return of, usb_control_msg
authorMalcolm Priestley <tvboxspy@gmail.com>
Fri, 20 Dec 2019 21:14:59 +0000 (21:14 +0000)
committerPaolo Pisati <paolo.pisati@canonical.com>
Thu, 30 Jan 2020 15:23:44 +0000 (16:23 +0100)
commit2dca2719354ea25592eaeab99c5733acf77a7e83
treebb952dc2afa1accee8bd8059e2004a1ece3ece69
parent773f6f3415b4b2e589a030c6d70faf768f71e5c6
staging: vt6656: Fix non zero logical return of, usb_control_msg

BugLink: https://bugs.launchpad.net/bugs/1860131
commit 58c3e681b04dd57c70d0dcb7b69fe52d043ff75a upstream.

Starting with commit 59608cb1de1856
("staging: vt6656: clean function's error path in usbpipe.c")
the usb control functions have returned errors throughout driver
with only logical variable checking.

However, usb_control_msg return the amount of bytes transferred
this means that normal operation causes errors.

Correct the return function so only return zero when transfer
is successful.

Cc: stable <stable@vger.kernel.org> # v5.3+
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/08e88842-6f78-a2e3-a7a0-139fec960b2b@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/staging/vt6656/usbpipe.c