* [PATCH] media: i2c: ov2659: Fix an error message
@ 2021-05-05 20:03 Christophe JAILLET
2021-05-05 20:11 ` Christophe JAILLET
0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2021-05-05 20:03 UTC (permalink / raw)
To: prabhakar.csengg, mchehab, sakari.ailus, bparrot, hans.verkuil
Cc: linux-media, linux-kernel, kernel-janitors, Christophe JAILLET
'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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] media: i2c: ov2659: Fix an error message
2021-05-05 20:03 [PATCH] media: i2c: ov2659: Fix an error message Christophe JAILLET
@ 2021-05-05 20:11 ` Christophe JAILLET
0 siblings, 0 replies; 2+ messages in thread
From: Christophe JAILLET @ 2021-05-05 20:11 UTC (permalink / raw)
To: prabhakar.csengg, mchehab, sakari.ailus, bparrot, hans.verkuil
Cc: linux-media, linux-kernel, kernel-janitors
Le 05/05/2021 à 22:03, Christophe JAILLET a écrit :
> '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);
>
NACK.
I should have looked at OV265X_ID before sending the patch.
I'll send a v2 that just removes 'ret'.
CJ
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-05 20:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-05 20:03 [PATCH] media: i2c: ov2659: Fix an error message Christophe JAILLET
2021-05-05 20:11 ` Christophe JAILLET
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).