Re: [PATCH v4 4/4] iio: adc: ltc2378: Enable triggered buffer data capture
From: Andy Shevchenko
Date: Mon Jun 29 2026 - 01:56:54 EST
On Thu, Jun 25, 2026 at 11:35:59AM -0300, Marcelo Schmitt wrote:
> Enable users to run triggered data captures with LTC2378 and similar ADCs.
...
> + indio_dev->channels = st->info->chan;
> + indio_dev->num_channels = ARRAY_SIZE(st->info->chan);
> +
> + ret = devm_iio_triggered_buffer_setup(dev, indio_dev,
> + iio_pollfunc_store_time,
> + ltc2378_trigger_handler,
> + NULL);
> + if (ret)
> + return dev_err_probe(dev, ret,
> + "failed to setup triggered buffer\n");
In 99.99% of error cases this will be -ENOMEM, so this is a dead code
effectively. Please, drop the message, return ret is enough.
--
With Best Regards,
Andy Shevchenko