Re: [PATCH v1] iio: health: max30102: fix NULL dereference in interrupt handler
David Lechner <[email protected]> Sun, 2 Aug 2026 10:21:41 -0500
| Newsgroups | dev.linux.lists.linux-kernel-mentees,org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On 8/1/26 9:10 PM, Jonathan Cameron wrote: > On Sat, 1 Aug 2026 10:18:42 -0500 > David Lechner <[email protected]> wrote: > >> On 7/31/26 1:41 PM, Marco Chen wrote: >>> The interrupt is requested in max30102_probe() and stays enabled >> >> I've always wondered why most IIO drivers seem to do this. It seems to >> me that requesting the irq with IRQF_NO_AUTOEN and only enabling it >> when everything is set up for reading data would avoid spurious interrupts >> like this. > > It teaches discipline. More serious from what I recall the no autoen thing > used to be done via a racey bit of trying to turn it off as fast as you can. > > Most of the time we should be able to write drivers that don't need to > use that flag and don't touch enable_irq() at all. > > Obviously that's not always true. > Hmm... so I should go back and change [1] since it isn't strictly required there? [1]: https://lore.kernel.org/linux-iio/20260731-iio-adc-ti-ads112c14-continuous-mode-v2-1-eb13da38e8fc@baylibre.com/