• Jianmin Lv's avatar
    irqchip/loongson-eiointc: Fix returned value on parsing MADT · 112eaa8f
    Jianmin Lv authored
    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: default avatarJianmin Lv <lvjianmin@loongson.cn>
    Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
    Link: https://lore.kernel.org/r/20230407083453.6305-2-lvjianmin@loongson.cn
    112eaa8f
irq-loongson-eiointc.c 10.6 KB