Skip to content

Commit 8d696b0

Browse files
lvjianmin-loongsonyetist
authored andcommitted
irqchip/loongson-eiointc: Fix returned value on parsing MADT
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. Signed-off-by: Jianmin Lv <lvjianmin@loongson.cn>
1 parent 3e2d777 commit 8d696b0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/irqchip/irq-loongson-eiointc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ static int __init pch_pic_parse_madt(union acpi_subtable_headers *header,
366366
if (parent)
367367
return pch_pic_acpi_init(parent, pchpic_entry);
368368

369-
return -EINVAL;
369+
return 0;
370370
}
371371

372372
static int __init pch_msi_parse_madt(union acpi_subtable_headers *header,
@@ -378,7 +378,7 @@ static int __init pch_msi_parse_madt(union acpi_subtable_headers *header,
378378
if (parent)
379379
return pch_msi_acpi_init(parent, pchmsi_entry);
380380

381-
return -EINVAL;
381+
return 0;
382382
}
383383

384384
static int __init acpi_cascade_irqdomain_init(void)

0 commit comments

Comments
 (0)