diff mbox series

[V2] media: i2c: ov2659: Fix an error message

Message ID d995e27db003a26e5b5eb53b0f40b55f8015d873.1620245794.git.christophe.jaillet@wanadoo.fr (mailing list archive)
State New, archived
Headers show
Series [V2] media: i2c: ov2659: Fix an error message | expand

Commit Message

Christophe JAILLET May 5, 2021, 8:17 p.m. UTC
'ret' is known to be 0 here and printing -ENODEV wouldn't be really
helpful. So remove it from the error message.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
V2: Remove the Fixes tag. It doesn't really fix something, it just removes
    a useless information.
    Just remove ret. No need to add something else.
---
 drivers/media/i2c/ov2659.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Lad, Prabhakar May 8, 2021, 12:53 p.m. UTC | #1
Hi Christophe,

Thank you for the patch.

On Wed, May 5, 2021 at 9:17 PM Christophe JAILLET
<christophe.jaillet@wanadoo.fr> wrote:
>
> 'ret' is known to be 0 here and printing -ENODEV wouldn't be really
> helpful. So remove it from the error message.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> V2: Remove the Fixes tag. It doesn't really fix something, it just removes
>     a useless information.
>     Just remove ret. No need to add something else.
> ---
>  drivers/media/i2c/ov2659.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
Acked-by: Lad Prabhakar <prabhakar.csengg@gmail.com>

Cheers,
Prabhakar

> diff --git a/drivers/media/i2c/ov2659.c b/drivers/media/i2c/ov2659.c
> index 42f64175a6df..6bbbb94fdda4 100644
> --- a/drivers/media/i2c/ov2659.c
> +++ b/drivers/media/i2c/ov2659.c
> @@ -1368,8 +1368,7 @@ 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 (%04X)\n", id);
>                         ret = -ENODEV;
>                 } else {
>                         dev_info(&client->dev, "Found OV%04X sensor\n", id);
> --
> 2.30.2
>
diff mbox series

Patch

diff --git a/drivers/media/i2c/ov2659.c b/drivers/media/i2c/ov2659.c
index 42f64175a6df..6bbbb94fdda4 100644
--- a/drivers/media/i2c/ov2659.c
+++ b/drivers/media/i2c/ov2659.c
@@ -1368,8 +1368,7 @@  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 (%04X)\n", id);
 			ret = -ENODEV;
 		} else {
 			dev_info(&client->dev, "Found OV%04X sensor\n", id);