summaryrefslogtreecommitdiff
path: root/drivers/irqchip
diff options
context:
space:
mode:
authorJianmin Lv <lvjianmin@loongson.cn>2023-04-07 11:34:49 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-05-17 12:53:48 +0300
commit2e51d7c09d1f4970971be13c8ffebd1391aa1a29 (patch)
treeb8214b6c2c3b4510592e08304581e0de7251a269 /drivers/irqchip
parent84c64fb57887595ba33edccb69a442b667bb5ead (diff)
downloadlinux-2e51d7c09d1f4970971be13c8ffebd1391aa1a29.tar.xz
irqchip/loongson-eiointc: Fix returned value on parsing MADT
commit 112eaa8fec5ea75f1be003ec55760b09a86799f8 upstream. In pch_pic_parse_madt(), a NULL parent pointer will be returned from acpi_get_vec_parent() for second pch-pic domain related to second bridge while calling eiointc_acpi_init() at first time, where the parent of it has not been initialized yet, and will be initialized during second time calling eiointc_acpi_init(). So, it's reasonable to return zero so that failure of acpi_table_parse_madt() will be avoided, or else acpi_cascade_irqdomain_init() will return and initialization of followed pch_msi domain will be skipped. Although it does not matter when pch_msi_parse_madt() returns -EINVAL if no invalid parent is found, it's also reasonable to return zero for that. Cc: stable@vger.kernel.org Signed-off-by: Jianmin Lv <lvjianmin@loongson.cn> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20230407083453.6305-2-lvjianmin@loongson.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/irqchip')
-rw-r--r--drivers/irqchip/irq-loongson-eiointc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/irqchip/irq-loongson-eiointc.c b/drivers/irqchip/irq-loongson-eiointc.c
index 16e9af8d8b1e..ab49cd15699f 100644
--- a/drivers/irqchip/irq-loongson-eiointc.c
+++ b/drivers/irqchip/irq-loongson-eiointc.c
@@ -312,7 +312,7 @@ pch_pic_parse_madt(union acpi_subtable_headers *header,
if (parent)
return pch_pic_acpi_init(parent, pchpic_entry);
- return -EINVAL;
+ return 0;
}
static int __init
@@ -325,7 +325,7 @@ pch_msi_parse_madt(union acpi_subtable_headers *header,
if (parent)
return pch_msi_acpi_init(parent, pchmsi_entry);
- return -EINVAL;
+ return 0;
}
static int __init acpi_cascade_irqdomain_init(void)