On 3/15/26 8:31 PM, Jonathan Cameron wrote:
> 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.
>
I do not see anything being printed on iio_triggered_buffer_setup_ext(),
so I guess this is not a duplicate. The function can return -EADDRINUSE
if a buffer is already assigned, to prevent cleanup function being
called on a buffer that wasn't allocated.
I will add this print back if necessary in v4.