On Tue, Dec 8, 2020 at 4:38 PM Lorenzo Bianconi <lorenzo@xxxxxxxxxx> wrote: > > Return a boolean value in st_sensors_new_samples_available routine in > order to avoid an infinite loop in st_sensors_irq_thread if > stat_drdy.addr is not defined or stat_drdy read fails ... > + if (!sdata->sensor_settings->drdy_irq.stat_drdy.addr) { > + dev_err(&indio_dev->dev, > + "edge IRQ not supported w/o stat register.\n"); > + err = -EOPNOTSUPP; Wrong error code. You must not return it to user space (or you should fix all call sites to be sure this won't be returned). > + goto iio_trigger_free; > + } -- With Best Regards, Andy Shevchenko