[PATCH v3 5/6] iio: light: vcnl4000: remove error messages for trigger and irq

Erikas Bitovtas
2026-03-14T16:06:44Z

The error code is available in the log after return. Remove duplicate
error messages to reduce noise in dmesg.

Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
---
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");
+ 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)

--
2.53.0