]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
media: flexcop-usb: ensure -EIO is returned on error condition
authorColin Ian King <colin.king@canonical.com>
Fri, 25 Oct 2019 13:33:39 +0000 (15:33 +0200)
committerPaolo Pisati <paolo.pisati@canonical.com>
Thu, 30 Jan 2020 15:22:17 +0000 (16:22 +0100)
commit7b0d4800655b3ddae29d1fd929ce35559b6a80cf
tree245b9c95e2343c74a7e721a56a381d6031414660
parente1da22707c0094ba4220dbd55b005d526abd4ee6
media: flexcop-usb: ensure -EIO is returned on error condition

BugLink: https://bugs.launchpad.net/bugs/1860125
commit 74a96b51a36de4d86660fbc56b05d86668162d6b upstream.

An earlier commit hard coded a return 0 to function flexcop_usb_i2c_req
even though the an -EIO was intended to be returned in the case where
ret != buflen.  Fix this by replacing the return 0 with the return of
ret to return the error return code.

Addresses-Coverity: ("Unused value")

Fixes: b430eaba0be5 ("[media] flexcop-usb: don't use stack for DMA")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/media/usb/b2c2/flexcop-usb.c