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

From: Konrad Dybcio

Date: Thu Nov 27 2025 - 13:38:51 EST


On 11/25/25 10:23 PM, Rudraksha Gupta wrote:
>
> On 11/25/25 03:14, Andy Shevchenko wrote:
>> 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.

[...]

> This seems to be confirmed upstream too, where one has an irq:
>
> https://github.com/torvalds/linux/blob/master/arch/arm/boot/dts/st/ste-ux500-samsung-skomer.dts#L420
>
>
> and others don't:
>
> https://github.com/torvalds/linux/blob/master/arch/arm/boot/dts/st/ste-ux500-samsung-kyle.dts#L439
>
> https://github.com/torvalds/linux/blob/master/arch/arm/boot/dts/st/ste-ux500-samsung-codina-tmo.dts#L506

Thanks for this investigation, it really seems like it's NC
> Happy to split this patch series into two, just let me know! :)

We won't be taking any non-urgent patches until rc1 drops (~3 weeks)
so if the IIO folks decide to pick it up in meantime, just send it as
one

Konrad