lkml.org 
[lkml]   [2021]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] media: i2c: ov2659: Fix an error message
Date
'ret' is known to be 0 here and printing -ENODEV wouldn't be really
helpful.
So, print something that may be helpful instead.

Fixes: c4c0283ab3cd ("[media] media: i2c: add support for omnivision's ov2659 sensor")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/media/i2c/ov2659.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/i2c/ov2659.c b/drivers/media/i2c/ov2659.c
index 42f64175a6df..96bda172b334 100644
--- a/drivers/media/i2c/ov2659.c
+++ b/drivers/media/i2c/ov2659.c
@@ -1368,8 +1368,8 @@ static int ov2659_detect(struct v4l2_subdev *sd)
id = OV265X_ID(pid, ver);
if (id != OV2659_ID) {
dev_err(&client->dev,
- "Sensor detection failed (%04X, %d)\n",
- id, ret);
+ "Sensor detection failed (id=%04X, pid=%X, ver=%X)\n",
+ id, (int)pid, (int)ver);
ret = -ENODEV;
} else {
dev_info(&client->dev, "Found OV%04X sensor\n", id);
--
2.30.2
\
 
 \ /
  Last update: 2021-05-05 22:05    [W:0.022 / U:24.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site