Skip to content

Commit

Permalink
irqchip/loongson-liointc: Fix an error handling path in liointc_init()
Browse files Browse the repository at this point in the history
All errors lead to the error handling path, except the one dealing
with "reg-names" in DT.

Fix it and release some resources before returning if this test fails.

Fixes: 0858ed0 ("irqchip/loongson-liointc: Add ACPI init support")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
[maz: fix commit message]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/1a6d74ab70712279023aa7bdbd31bd3aec103bc0.1659382063.git.christophe.jaillet@wanadoo.fr
  • Loading branch information
Christophe JAILLET authored and Marc Zyngier committed Aug 12, 2022
1 parent 7e4fd7a commit a9084d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/irqchip/irq-loongson-liointc.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static int liointc_init(phys_addr_t addr, unsigned long size, int revision,
"reg-names", core_reg_names[i]);

if (index < 0)
return -EINVAL;
goto out_iounmap;

priv->core_isr[i] = of_iomap(node, index);
}
Expand Down

0 comments on commit a9084d8

Please sign in to comment.