summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2019-10-25 16:33:39 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-09 12:20:04 +0300
commit6851d4004b6f770dd9e71b4da61a02d14cbacedb (patch)
treec304c26de0a0179866648604daadc0775e43bd3c
parent0123e668ca943ac9d9ceb9579f007e4581d92b63 (diff)
downloadlinux-6851d4004b6f770dd9e71b4da61a02d14cbacedb.tar.xz
media: flexcop-usb: ensure -EIO is returned on error condition
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>
-rw-r--r--drivers/media/usb/b2c2/flexcop-usb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/b2c2/flexcop-usb.c b/drivers/media/usb/b2c2/flexcop-usb.c
index d1331f828108..039963a7765b 100644
--- a/drivers/media/usb/b2c2/flexcop-usb.c
+++ b/drivers/media/usb/b2c2/flexcop-usb.c
@@ -295,7 +295,7 @@ static int flexcop_usb_i2c_req(struct flexcop_i2c_adapter *i2c,
mutex_unlock(&fc_usb->data_mutex);
- return 0;
+ return ret;
}
/* actual bus specific access functions,