# Re: \[PATCH v5 05/20\] Input: axp20x-pek: Bail out if AXP has no interrupt line connected

- From: Dmitry Torokhov \<dmitry.torokhov@gmail.com\>
- Date: 2021-01-27 19:47:54 
- List: linux-arm-kernel
- Page: https://ratatoskr.run/linux-arm-kernel/2021/01/6249990
- Thread: https://ratatoskr.run/linux-arm-kernel/2021/01/6249813/t.md

```text
Hi Andre,

On Wed, Jan 27, 2021 at 05:24:45PM +0000, Andre Przywara wrote:
> On at least one board (Orangepi Zero2) the AXP305 PMIC does not have its
> interrupt line connected to the CPU (mostly because the H616 SoC does
> not feature an NMI pin anymore).
> After allowing the AXP driver to proceed without an "interrupts"
> property [1], the axp20x-pek driver crashes with a NULL pointer
> dereference (see below).
> 
> Check for the regmap_irqc member to be not NULL before proceeding with
> probe. This gets normally filled by the call to regmap_add_irq_chip(),
> which we allow to skip now, when the DT node lacks an interrupt
> property.

No, the driver is not the right place to patch this; regmap should be
fixed so it does not crash instead.

Thanks.

-- 
Dmitry

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
```
