Re: [PATCH v4 5/6] iio: accel: Prevent NULL pointer dereference in interrupt setup

From: Andy Shevchenko
Date: Tue Nov 25 2025 - 06:16:11 EST


On Tue, Nov 25, 2025 at 11:45:22AM +0100, Konrad Dybcio wrote:
> On 11/25/25 12:35 AM, Rudraksha Gupta via B4 Relay wrote:
> >
> > The bmc150_accel_set_interrupt() function assumes that the interrupt
> > info is provided. However, when no IRQ is provided, the info pointer
> > remains NULL, leading to a kernel oops:
>
> Hm, are you sure your device really doesn't have a pin connected to
> the IC's interrupt line?

I don't know the actual case here, but in general such a design occurred
in real life. So, shouldn't be a surprise to see another polling only mode
connection like this.

--
With Best Regards,
Andy Shevchenko