diff options
author | Alexander Stein <alexander.stein@ew.tq-group.com> | 2023-04-25 09:33:46 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2023-07-19 12:57:47 +0200 |
commit | fae4280ece942b7c02be6d9bcce2873cdea32fe7 (patch) | |
tree | 9a29d9b556a6f997552e591e15b9071a3ca5ed59 /drivers/media | |
parent | media: dib7000p: Fix potential division by zero (diff) | |
download | linux-fae4280ece942b7c02be6d9bcce2873cdea32fe7.tar.xz linux-fae4280ece942b7c02be6d9bcce2873cdea32fe7.zip |
media: tc358743: Add error code to error message
Add the error code of a failed i2c transfer to the error message.
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/i2c/tc358743.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c index 15f8163be9bf..2785935da497 100644 --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c @@ -133,8 +133,8 @@ static void i2c_rd(struct v4l2_subdev *sd, u16 reg, u8 *values, u32 n) err = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs)); if (err != ARRAY_SIZE(msgs)) { - v4l2_err(sd, "%s: reading register 0x%x from 0x%x failed\n", - __func__, reg, client->addr); + v4l2_err(sd, "%s: reading register 0x%x from 0x%x failed: %d\n", + __func__, reg, client->addr, err); } } @@ -165,8 +165,8 @@ static void i2c_wr(struct v4l2_subdev *sd, u16 reg, u8 *values, u32 n) err = i2c_transfer(client->adapter, &msg, 1); if (err != 1) { - v4l2_err(sd, "%s: writing register 0x%x from 0x%x failed\n", - __func__, reg, client->addr); + v4l2_err(sd, "%s: writing register 0x%x from 0x%x failed: %d\n", + __func__, reg, client->addr, err); return; } |