mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
media: rc: i2c: Fix an error message
[ Upstream commit 9c87ae1a0dbeb5794957421157fd266d38a869b4 ]
'ret' is known to be 1 here. In fact 'i' is expected instead.
Store the return value of 'i2c_master_recv()' in 'ret' so that the error
message print the correct error code.
Fixes: acaa34bf06 ("media: rc: implement zilog transmitter")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
6ee810a559
commit
3eec64b596
1 changed files with 2 additions and 2 deletions
|
|
@ -678,8 +678,8 @@ static int zilog_tx(struct rc_dev *rcdev, unsigned int *txbuf,
|
|||
goto out_unlock;
|
||||
}
|
||||
|
||||
i = i2c_master_recv(ir->tx_c, buf, 1);
|
||||
if (i != 1) {
|
||||
ret = i2c_master_recv(ir->tx_c, buf, 1);
|
||||
if (ret != 1) {
|
||||
dev_err(&ir->rc->dev, "i2c_master_recv failed with %d\n", ret);
|
||||
ret = -EIO;
|
||||
goto out_unlock;
|
||||
|
|
|
|||
Loading…
Reference in a new issue