Skip to content

Commit de8b6e1

Browse files
Devyn Liubroonie
authored andcommitted
spi: hisi-sfc-v3xx: Return IRQ_NONE if no interrupts were detected
Return IRQ_NONE from the interrupt handler when no interrupt was detected. Because an empty interrupt will cause a null pointer error: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008 Call trace: complete+0x54/0x100 hisi_sfc_v3xx_isr+0x2c/0x40 [spi_hisi_sfc_v3xx] __handle_irq_event_percpu+0x64/0x1e0 handle_irq_event+0x7c/0x1cc Signed-off-by: Devyn Liu <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 633cd6f commit de8b6e1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/spi/spi-hisi-sfc-v3xx.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,11 @@ static const struct spi_controller_mem_ops hisi_sfc_v3xx_mem_ops = {
377377
static irqreturn_t hisi_sfc_v3xx_isr(int irq, void *data)
378378
{
379379
struct hisi_sfc_v3xx_host *host = data;
380+
u32 reg;
381+
382+
reg = readl(host->regbase + HISI_SFC_V3XX_INT_STAT);
383+
if (!reg)
384+
return IRQ_NONE;
380385

381386
hisi_sfc_v3xx_disable_int(host);
382387

0 commit comments

Comments
 (0)