Re: [PATCH v2 4/4] iio: humidity: drop hid_sensor_remove_trigger() using devm API
From: Andy Shevchenko
Date: Wed Apr 29 2026 - 15:34:28 EST
On Wed, Apr 29, 2026 at 11:29:18PM +0530, Sanjay Chitroda wrote:
> Use devm_hid_sensor_setup_trigger() to automatically release resource
> during fail, unbind or removal of driver using devres framework.
>
> This simplify the setup, remove goto, avoid manual resource cleanup in
> teardown path.
...
> - ret = hid_sensor_setup_trigger(indio_dev, name,
> - &humid_st->common_attributes);
> + ret = devm_hid_sensor_setup_trigger(&indio_dev->dev, indio_dev, name,
> + &humid_st->common_attributes);
I believe the first parameter is utterly wrong here.
Or other way around, same issue but in the previous patch.
> if (ret)
> return ret;
--
With Best Regards,
Andy Shevchenko