mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "irqchip-bot for Jianmin Lv" <tip-bot2@linutronix.de>
To: linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org, Jianmin Lv <lvjianmin@loongson.cn>,
	Marc Zyngier <maz@kernel.org>,
	tglx@linutronix.de
Subject: [irqchip: irq/irqchip-next] irqchip/loongson-eiointc: Fix returned value on parsing MADT
Date: Sat, 08 Apr 2023 10:45:15 -0000	[thread overview]
Message-ID: <168095071596.404.15580990145239593807.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20230407083453.6305-2-lvjianmin@loongson.cn>

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     112eaa8fec5ea75f1be003ec55760b09a86799f8
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/112eaa8fec5ea75f1be003ec55760b09a86799f8
Author:        Jianmin Lv <lvjianmin@loongson.cn>
AuthorDate:    Fri, 07 Apr 2023 16:34:49 +08:00
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Sat, 08 Apr 2023 11:29:18 +01:00

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.

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
---
 drivers/irqchip/irq-loongson-eiointc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/irq-loongson-eiointc.c b/drivers/irqchip/irq-loongson-eiointc.c
index d15fd38..62a632d 100644
--- a/drivers/irqchip/irq-loongson-eiointc.c
+++ b/drivers/irqchip/irq-loongson-eiointc.c
@@ -343,7 +343,7 @@ static int __init 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 pch_msi_parse_madt(union acpi_subtable_headers *header,
@@ -355,7 +355,7 @@ static int __init 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)

  reply	other threads:[~2023-04-08 10:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-07  8:34 [PATCH V3 0/5] Fix some issues of irq controllers for dual-bridges scenario Jianmin Lv
2023-04-07  8:34 ` [PATCH V3 1/5] irqchip/loongson-eiointc: Fix returned value on parsing MADT Jianmin Lv
2023-04-08 10:45   ` irqchip-bot for Jianmin Lv [this message]
2023-04-07  8:34 ` [PATCH V3 2/5] irqchip/loongson-eiointc: Fix incorrect use of acpi_get_vec_parent Jianmin Lv
2023-04-08 10:45   ` [irqchip: irq/irqchip-next] " irqchip-bot for Jianmin Lv
2023-04-07  8:34 ` [PATCH V3 3/5] irqchip/loongson-eiointc: Fix registration of syscore_ops Jianmin Lv
2023-04-08 10:45   ` [irqchip: irq/irqchip-next] " irqchip-bot for Jianmin Lv
2023-04-07  8:34 ` [PATCH V3 4/5] irqchip/loongson-pch-pic: " Jianmin Lv
2023-04-08 10:45   ` [irqchip: irq/irqchip-next] " irqchip-bot for Jianmin Lv
2023-04-07  8:34 ` [PATCH V3 5/5] irqchip/loongson-pch-pic: Fix pch_pic_acpi_init calling Jianmin Lv
2023-04-08 10:45   ` [irqchip: irq/irqchip-next] " irqchip-bot for Jianmin Lv
2023-04-09  1:44 ` [PATCH V3 0/5] Fix some issues of irq controllers for dual-bridges scenario Huacai Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=168095071596.404.15580990145239593807.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lvjianmin@loongson.cn \
    --cc=maz@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®