mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 12:33:18 -04:00
irqchip/loongson-htvec: Check return value of irq_domain_translate_onecell()
Check the return value of irq_domain_translate_onecell() due to
it may returns -EINVAL if failed.
Fixes: 818e915fba ("irqchip: Add Loongson HyperTransport Vector support")
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/1594087972-21715-5-git-send-email-yangtiezhu@loongson.cn
This commit is contained in:
committed by
Marc Zyngier
parent
652d54e77a
commit
dbec37048d
@@ -109,11 +109,14 @@ static struct irq_chip htvec_irq_chip = {
|
||||
static int htvec_domain_alloc(struct irq_domain *domain, unsigned int virq,
|
||||
unsigned int nr_irqs, void *arg)
|
||||
{
|
||||
int ret;
|
||||
unsigned long hwirq;
|
||||
unsigned int type, i;
|
||||
struct htvec *priv = domain->host_data;
|
||||
|
||||
irq_domain_translate_onecell(domain, arg, &hwirq, &type);
|
||||
ret = irq_domain_translate_onecell(domain, arg, &hwirq, &type);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
for (i = 0; i < nr_irqs; i++) {
|
||||
irq_domain_set_info(domain, virq + i, hwirq + i, &htvec_irq_chip,
|
||||
|
||||
Reference in New Issue
Block a user