Skip to content

Commit bab207d

Browse files
tititiou36gregkh
authored andcommitted
media: rc: i2c: Fix an error message
[ Upstream commit 9c87ae1 ] '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: acaa34b ("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>
1 parent a9d0297 commit bab207d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/media/i2c/ir-kbd-i2c.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -678,8 +678,8 @@ static int zilog_tx(struct rc_dev *rcdev, unsigned int *txbuf,
678678
goto out_unlock;
679679
}
680680

681-
i = i2c_master_recv(ir->tx_c, buf, 1);
682-
if (i != 1) {
681+
ret = i2c_master_recv(ir->tx_c, buf, 1);
682+
if (ret != 1) {
683683
dev_err(&ir->rc->dev, "i2c_master_recv failed with %d\n", ret);
684684
ret = -EIO;
685685
goto out_unlock;

0 commit comments

Comments
 (0)