Skip to content

Commit 4a60a3c

Browse files
Liu PeibaoMarc Zyngier
authored andcommitted
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 b2c4c39 ("irqchip/loongson-liointc: irqchip add 2.0 version") did. Fixes: 0858ed0 ("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
1 parent d502c55 commit 4a60a3c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

drivers/irqchip/irq-loongson-liointc.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,13 @@ static int liointc_init(phys_addr_t addr, unsigned long size, int revision,
207207
"reg-names", core_reg_names[i]);
208208

209209
if (index < 0)
210-
goto out_iounmap;
210+
continue;
211211

212212
priv->core_isr[i] = of_iomap(node, index);
213213
}
214+
215+
if (!priv->core_isr[0])
216+
goto out_iounmap;
214217
}
215218

216219
/* Setup IRQ domain */

0 commit comments

Comments
 (0)