]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: pca953x: Survive spurious interrupts
authorMarc Zyngier <maz@kernel.org>
Mon, 5 Oct 2020 14:02:17 +0000 (15:02 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 7 Oct 2020 09:47:41 +0000 (11:47 +0200)
commit9f88d7b482715ee85cd331a2f85d31886d6c72de
tree9d168af1a0db163e24a5f79afd4c88f172dc1831
parent80a39fa4b82b0f79638f2eadea93d750a2b21263
gpio: pca953x: Survive spurious interrupts

The pca953x driver never checks the result of irq_find_mapping(),
which returns 0 when no mapping is found. When a spurious interrupt
is delivered (which can happen under obscure circumstances), the
kernel explodes as it still tries to handle the error code as
a real interrupt.

Handle this particular case and warn on spurious interrupts.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20201005140217.c3f9563-1-maz@kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-pca953x.c