Skip to content

Commit

Permalink
media: flexcop-usb: ensure -EIO is returned on error condition
Browse files Browse the repository at this point in the history
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: b430eab ("[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>
  • Loading branch information
Colin Ian King authored and Mauro Carvalho Chehab committed Nov 9, 2019
1 parent 1b976fc commit 74a96b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/usb/b2c2/flexcop-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 74a96b5

Please sign in to comment.