Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

irqchip/loongson-liointc: Fix improper error handling in liointc_init()

For cores less than 4, eg, loongson2k1000 with 2 cores, the
of_property_match_string() may return with an error value,
which causes that liointc could not work. At least isr0 is
what should be checked like previous commit b2c4c3969fd7
("irqchip/loongson-liointc: irqchip add 2.0 version") did.

Fixes: 0858ed035a85 ("irqchip/loongson-liointc: Add ACPI init support")
Signed-off-by: Liu Peibao <liupeibao@loongson.cn>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221104110712.23300-1-liupeibao@loongson.cn

authored by

Liu Peibao and committed by
Marc Zyngier
4a60a3cd d502c558

+4 -1
+4 -1
drivers/irqchip/irq-loongson-liointc.c
··· 207 207 "reg-names", core_reg_names[i]); 208 208 209 209 if (index < 0) 210 - goto out_iounmap; 210 + continue; 211 211 212 212 priv->core_isr[i] = of_iomap(node, index); 213 213 } 214 + 215 + if (!priv->core_isr[0]) 216 + goto out_iounmap; 214 217 } 215 218 216 219 /* Setup IRQ domain */