Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 51ebfce1 authored by Colin Ian King's avatar Colin Ian King Committed by Greg Kroah-Hartman
Browse files

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: b430eaba ("[media] flexcop-usb: don't use stack for DMA")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dfde3147
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -294,7 +294,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,