On Sat, 14 Mar 2026 18:06:34 +0200
Erikas Bitovtas <[email protected]> wrote:

> The error code is available in the log after return. Remove duplicate
> error messages to reduce noise in dmesg.
> 
> Signed-off-by: Erikas Bitovtas <[email protected]>
> ---
>  drivers/iio/light/vcnl4000.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/iio/light/vcnl4000.c b/drivers/iio/light/vcnl4000.c
> index e501db7249d7..c8bb1826b916 100644
> --- a/drivers/iio/light/vcnl4000.c
> +++ b/drivers/iio/light/vcnl4000.c
> @@ -2041,11 +2041,8 @@ static int vcnl4000_probe(struct i2c_client *client)
>                                                     NULL,
>                                                     
> data->chip_spec->trig_buffer_func,
>                                                     
> data->chip_spec->buffer_setup_ops);
> -             if (ret < 0) {
> -                     dev_err(&client->dev,
> -                             "unable to setup iio triggered buffer\n");

Is this one a duplicate? I don't recall us being particular verbose
in terms of error messages in iio_triggered_buffer_setup_ext() which is
where that ends up coming from.  I think there is only one path
where it can return anything other than -ENOMEM and that one is a duplicate
registration check (so fair to not print).  So perhaps all this patch
needs is a comment on what errors can surface from this call and why
it is therefore not worth printing anything.



> +             if (ret < 0)
>                       return ret;
> -             }
>       }
>  
>       if (client->irq && data->chip_spec->irq_thread) {
> @@ -2055,10 +2052,8 @@ static int vcnl4000_probe(struct i2c_client *client)
>                                               IRQF_ONESHOT,
>                                               "vcnl4000_irq",
>                                               indio_dev);
> -             if (ret < 0) {
> -                     dev_err(&client->dev, "irq request failed\n");
> +             if (ret < 0)
>                       return ret;
> -             }
>  
>               ret = vcnl4010_probe_trigger(indio_dev);
>               if (ret < 0)
> 


Reply via email to