2022-10-20 15:03:44

by Huacai Chen

[permalink] [raw]
Subject: [PATCH V2] irqchip/loongarch: Adjust acpi_cascade_irqdomain_init() and sub-routines

1, Adjust the return of acpi_cascade_irqdomain_init() and check its
return value.
2, Combine unnecessary short lines to one long line.

Signed-off-by: Huacai Chen <[email protected]>
---
V2: Adjust the return of acpi_cascade_irqdomain_init() and check its
return value.

drivers/irqchip/irq-loongarch-cpu.c | 30 +++++++++++++++-----------
drivers/irqchip/irq-loongson-eiointc.c | 30 +++++++++++++++-----------
drivers/irqchip/irq-loongson-pch-pic.c | 15 +++++++------
3 files changed, 44 insertions(+), 31 deletions(-)

diff --git a/drivers/irqchip/irq-loongarch-cpu.c b/drivers/irqchip/irq-loongarch-cpu.c
index 741612ba6a52..fdec3e9cfacf 100644
--- a/drivers/irqchip/irq-loongarch-cpu.c
+++ b/drivers/irqchip/irq-loongarch-cpu.c
@@ -92,18 +92,16 @@ static const struct irq_domain_ops loongarch_cpu_intc_irq_domain_ops = {
.xlate = irq_domain_xlate_onecell,
};

-static int __init
-liointc_parse_madt(union acpi_subtable_headers *header,
- const unsigned long end)
+static int __init liointc_parse_madt(union acpi_subtable_headers *header,
+ const unsigned long end)
{
struct acpi_madt_lio_pic *liointc_entry = (struct acpi_madt_lio_pic *)header;

return liointc_acpi_init(irq_domain, liointc_entry);
}

-static int __init
-eiointc_parse_madt(union acpi_subtable_headers *header,
- const unsigned long end)
+static int __init eiointc_parse_madt(union acpi_subtable_headers *header,
+ const unsigned long end)
{
struct acpi_madt_eio_pic *eiointc_entry = (struct acpi_madt_eio_pic *)header;

@@ -112,16 +110,24 @@ eiointc_parse_madt(union acpi_subtable_headers *header,

static int __init acpi_cascade_irqdomain_init(void)
{
- acpi_table_parse_madt(ACPI_MADT_TYPE_LIO_PIC,
- liointc_parse_madt, 0);
- acpi_table_parse_madt(ACPI_MADT_TYPE_EIO_PIC,
- eiointc_parse_madt, 0);
+ int r;
+
+ r = acpi_table_parse_madt(ACPI_MADT_TYPE_LIO_PIC, liointc_parse_madt, 0);
+ if (r < 0)
+ return r;
+
+ r = acpi_table_parse_madt(ACPI_MADT_TYPE_EIO_PIC, eiointc_parse_madt, 0);
+ if (r < 0)
+ return r;
+
return 0;
}

static int __init cpuintc_acpi_init(union acpi_subtable_headers *header,
const unsigned long end)
{
+ int ret;
+
if (irq_domain)
return 0;

@@ -139,9 +145,9 @@ static int __init cpuintc_acpi_init(union acpi_subtable_headers *header,
set_handle_irq(&handle_cpu_irq);
acpi_set_irq_model(ACPI_IRQ_MODEL_LPIC, lpic_get_gsi_domain_id);
acpi_set_gsi_to_irq_fallback(lpic_gsi_to_irq);
- acpi_cascade_irqdomain_init();
+ ret = acpi_cascade_irqdomain_init();

- return 0;
+ return ret;
}

IRQCHIP_ACPI_DECLARE(cpuintc_v1, ACPI_MADT_TYPE_CORE_PIC,
diff --git a/drivers/irqchip/irq-loongson-eiointc.c b/drivers/irqchip/irq-loongson-eiointc.c
index 16e9af8d8b1e..62867209736c 100644
--- a/drivers/irqchip/irq-loongson-eiointc.c
+++ b/drivers/irqchip/irq-loongson-eiointc.c
@@ -301,9 +301,8 @@ static struct irq_domain *acpi_get_vec_parent(int node, struct acpi_vector_group
return NULL;
}

-static int __init
-pch_pic_parse_madt(union acpi_subtable_headers *header,
- const unsigned long end)
+static int __init pch_pic_parse_madt(union acpi_subtable_headers *header,
+ const unsigned long end)
{
struct acpi_madt_bio_pic *pchpic_entry = (struct acpi_madt_bio_pic *)header;
unsigned int node = (pchpic_entry->address >> 44) & 0xf;
@@ -315,9 +314,8 @@ pch_pic_parse_madt(union acpi_subtable_headers *header,
return -EINVAL;
}

-static int __init
-pch_msi_parse_madt(union acpi_subtable_headers *header,
- const unsigned long end)
+static int __init pch_msi_parse_madt(union acpi_subtable_headers *header,
+ const unsigned long end)
{
struct acpi_madt_msi_pic *pchmsi_entry = (struct acpi_madt_msi_pic *)header;
struct irq_domain *parent = acpi_get_vec_parent(eiointc_priv[nr_pics - 1]->node, msi_group);
@@ -330,17 +328,23 @@ pch_msi_parse_madt(union acpi_subtable_headers *header,

static int __init acpi_cascade_irqdomain_init(void)
{
- acpi_table_parse_madt(ACPI_MADT_TYPE_BIO_PIC,
- pch_pic_parse_madt, 0);
- acpi_table_parse_madt(ACPI_MADT_TYPE_MSI_PIC,
- pch_msi_parse_madt, 1);
+ int r;
+
+ r = acpi_table_parse_madt(ACPI_MADT_TYPE_BIO_PIC, pch_pic_parse_madt, 0);
+ if (r < 0)
+ return r;
+
+ r = acpi_table_parse_madt(ACPI_MADT_TYPE_MSI_PIC, pch_msi_parse_madt, 1);
+ if (r < 0)
+ return r;
+
return 0;
}

int __init eiointc_acpi_init(struct irq_domain *parent,
struct acpi_madt_eio_pic *acpi_eiointc)
{
- int i, parent_irq;
+ int i, ret, parent_irq;
unsigned long node_map;
struct eiointc_priv *priv;

@@ -386,9 +390,9 @@ int __init eiointc_acpi_init(struct irq_domain *parent,

acpi_set_vec_parent(acpi_eiointc->node, priv->eiointc_domain, pch_group);
acpi_set_vec_parent(acpi_eiointc->node, priv->eiointc_domain, msi_group);
- acpi_cascade_irqdomain_init();
+ ret = acpi_cascade_irqdomain_init();

- return 0;
+ return ret;

out_free_handle:
irq_domain_free_fwnode(priv->domain_handle);
diff --git a/drivers/irqchip/irq-loongson-pch-pic.c b/drivers/irqchip/irq-loongson-pch-pic.c
index c01b9c257005..7477bbcf89fb 100644
--- a/drivers/irqchip/irq-loongson-pch-pic.c
+++ b/drivers/irqchip/irq-loongson-pch-pic.c
@@ -325,9 +325,8 @@ int find_pch_pic(u32 gsi)
return -1;
}

-static int __init
-pch_lpc_parse_madt(union acpi_subtable_headers *header,
- const unsigned long end)
+static int __init pch_lpc_parse_madt(union acpi_subtable_headers *header,
+ const unsigned long end)
{
struct acpi_madt_lpc_pic *pchlpc_entry = (struct acpi_madt_lpc_pic *)header;

@@ -336,8 +335,12 @@ pch_lpc_parse_madt(union acpi_subtable_headers *header,

static int __init acpi_cascade_irqdomain_init(void)
{
- acpi_table_parse_madt(ACPI_MADT_TYPE_LPC_PIC,
- pch_lpc_parse_madt, 0);
+ int r;
+
+ r = acpi_table_parse_madt(ACPI_MADT_TYPE_LPC_PIC, pch_lpc_parse_madt, 0);
+ if (r < 0)
+ return r;
+
return 0;
}

@@ -364,7 +367,7 @@ int __init pch_pic_acpi_init(struct irq_domain *parent,
}

if (acpi_pchpic->id == 0)
- acpi_cascade_irqdomain_init();
+ ret = acpi_cascade_irqdomain_init();

return ret;
}
--
2.31.1


2022-11-27 06:16:17

by Huacai Chen

[permalink] [raw]
Subject: Re: [PATCH V2] irqchip/loongarch: Adjust acpi_cascade_irqdomain_init() and sub-routines

Hi, Marc,

Just a gentle ping, I found that "irqchip/loongson-htvec: Add ACPI
init support" has been merged, so I think this patch can also be
merged to keep acpi_cascade_irqdomain_init()'s consistency. Thanks.


Huacai

On Thu, Oct 20, 2022 at 10:27 PM Huacai Chen <[email protected]> wrote:
>
> 1, Adjust the return of acpi_cascade_irqdomain_init() and check its
> return value.
> 2, Combine unnecessary short lines to one long line.
>
> Signed-off-by: Huacai Chen <[email protected]>
> ---
> V2: Adjust the return of acpi_cascade_irqdomain_init() and check its
> return value.
>
> drivers/irqchip/irq-loongarch-cpu.c | 30 +++++++++++++++-----------
> drivers/irqchip/irq-loongson-eiointc.c | 30 +++++++++++++++-----------
> drivers/irqchip/irq-loongson-pch-pic.c | 15 +++++++------
> 3 files changed, 44 insertions(+), 31 deletions(-)
>
> diff --git a/drivers/irqchip/irq-loongarch-cpu.c b/drivers/irqchip/irq-loongarch-cpu.c
> index 741612ba6a52..fdec3e9cfacf 100644
> --- a/drivers/irqchip/irq-loongarch-cpu.c
> +++ b/drivers/irqchip/irq-loongarch-cpu.c
> @@ -92,18 +92,16 @@ static const struct irq_domain_ops loongarch_cpu_intc_irq_domain_ops = {
> .xlate = irq_domain_xlate_onecell,
> };
>
> -static int __init
> -liointc_parse_madt(union acpi_subtable_headers *header,
> - const unsigned long end)
> +static int __init liointc_parse_madt(union acpi_subtable_headers *header,
> + const unsigned long end)
> {
> struct acpi_madt_lio_pic *liointc_entry = (struct acpi_madt_lio_pic *)header;
>
> return liointc_acpi_init(irq_domain, liointc_entry);
> }
>
> -static int __init
> -eiointc_parse_madt(union acpi_subtable_headers *header,
> - const unsigned long end)
> +static int __init eiointc_parse_madt(union acpi_subtable_headers *header,
> + const unsigned long end)
> {
> struct acpi_madt_eio_pic *eiointc_entry = (struct acpi_madt_eio_pic *)header;
>
> @@ -112,16 +110,24 @@ eiointc_parse_madt(union acpi_subtable_headers *header,
>
> static int __init acpi_cascade_irqdomain_init(void)
> {
> - acpi_table_parse_madt(ACPI_MADT_TYPE_LIO_PIC,
> - liointc_parse_madt, 0);
> - acpi_table_parse_madt(ACPI_MADT_TYPE_EIO_PIC,
> - eiointc_parse_madt, 0);
> + int r;
> +
> + r = acpi_table_parse_madt(ACPI_MADT_TYPE_LIO_PIC, liointc_parse_madt, 0);
> + if (r < 0)
> + return r;
> +
> + r = acpi_table_parse_madt(ACPI_MADT_TYPE_EIO_PIC, eiointc_parse_madt, 0);
> + if (r < 0)
> + return r;
> +
> return 0;
> }
>
> static int __init cpuintc_acpi_init(union acpi_subtable_headers *header,
> const unsigned long end)
> {
> + int ret;
> +
> if (irq_domain)
> return 0;
>
> @@ -139,9 +145,9 @@ static int __init cpuintc_acpi_init(union acpi_subtable_headers *header,
> set_handle_irq(&handle_cpu_irq);
> acpi_set_irq_model(ACPI_IRQ_MODEL_LPIC, lpic_get_gsi_domain_id);
> acpi_set_gsi_to_irq_fallback(lpic_gsi_to_irq);
> - acpi_cascade_irqdomain_init();
> + ret = acpi_cascade_irqdomain_init();
>
> - return 0;
> + return ret;
> }
>
> IRQCHIP_ACPI_DECLARE(cpuintc_v1, ACPI_MADT_TYPE_CORE_PIC,
> diff --git a/drivers/irqchip/irq-loongson-eiointc.c b/drivers/irqchip/irq-loongson-eiointc.c
> index 16e9af8d8b1e..62867209736c 100644
> --- a/drivers/irqchip/irq-loongson-eiointc.c
> +++ b/drivers/irqchip/irq-loongson-eiointc.c
> @@ -301,9 +301,8 @@ static struct irq_domain *acpi_get_vec_parent(int node, struct acpi_vector_group
> return NULL;
> }
>
> -static int __init
> -pch_pic_parse_madt(union acpi_subtable_headers *header,
> - const unsigned long end)
> +static int __init pch_pic_parse_madt(union acpi_subtable_headers *header,
> + const unsigned long end)
> {
> struct acpi_madt_bio_pic *pchpic_entry = (struct acpi_madt_bio_pic *)header;
> unsigned int node = (pchpic_entry->address >> 44) & 0xf;
> @@ -315,9 +314,8 @@ pch_pic_parse_madt(union acpi_subtable_headers *header,
> return -EINVAL;
> }
>
> -static int __init
> -pch_msi_parse_madt(union acpi_subtable_headers *header,
> - const unsigned long end)
> +static int __init pch_msi_parse_madt(union acpi_subtable_headers *header,
> + const unsigned long end)
> {
> struct acpi_madt_msi_pic *pchmsi_entry = (struct acpi_madt_msi_pic *)header;
> struct irq_domain *parent = acpi_get_vec_parent(eiointc_priv[nr_pics - 1]->node, msi_group);
> @@ -330,17 +328,23 @@ pch_msi_parse_madt(union acpi_subtable_headers *header,
>
> static int __init acpi_cascade_irqdomain_init(void)
> {
> - acpi_table_parse_madt(ACPI_MADT_TYPE_BIO_PIC,
> - pch_pic_parse_madt, 0);
> - acpi_table_parse_madt(ACPI_MADT_TYPE_MSI_PIC,
> - pch_msi_parse_madt, 1);
> + int r;
> +
> + r = acpi_table_parse_madt(ACPI_MADT_TYPE_BIO_PIC, pch_pic_parse_madt, 0);
> + if (r < 0)
> + return r;
> +
> + r = acpi_table_parse_madt(ACPI_MADT_TYPE_MSI_PIC, pch_msi_parse_madt, 1);
> + if (r < 0)
> + return r;
> +
> return 0;
> }
>
> int __init eiointc_acpi_init(struct irq_domain *parent,
> struct acpi_madt_eio_pic *acpi_eiointc)
> {
> - int i, parent_irq;
> + int i, ret, parent_irq;
> unsigned long node_map;
> struct eiointc_priv *priv;
>
> @@ -386,9 +390,9 @@ int __init eiointc_acpi_init(struct irq_domain *parent,
>
> acpi_set_vec_parent(acpi_eiointc->node, priv->eiointc_domain, pch_group);
> acpi_set_vec_parent(acpi_eiointc->node, priv->eiointc_domain, msi_group);
> - acpi_cascade_irqdomain_init();
> + ret = acpi_cascade_irqdomain_init();
>
> - return 0;
> + return ret;
>
> out_free_handle:
> irq_domain_free_fwnode(priv->domain_handle);
> diff --git a/drivers/irqchip/irq-loongson-pch-pic.c b/drivers/irqchip/irq-loongson-pch-pic.c
> index c01b9c257005..7477bbcf89fb 100644
> --- a/drivers/irqchip/irq-loongson-pch-pic.c
> +++ b/drivers/irqchip/irq-loongson-pch-pic.c
> @@ -325,9 +325,8 @@ int find_pch_pic(u32 gsi)
> return -1;
> }
>
> -static int __init
> -pch_lpc_parse_madt(union acpi_subtable_headers *header,
> - const unsigned long end)
> +static int __init pch_lpc_parse_madt(union acpi_subtable_headers *header,
> + const unsigned long end)
> {
> struct acpi_madt_lpc_pic *pchlpc_entry = (struct acpi_madt_lpc_pic *)header;
>
> @@ -336,8 +335,12 @@ pch_lpc_parse_madt(union acpi_subtable_headers *header,
>
> static int __init acpi_cascade_irqdomain_init(void)
> {
> - acpi_table_parse_madt(ACPI_MADT_TYPE_LPC_PIC,
> - pch_lpc_parse_madt, 0);
> + int r;
> +
> + r = acpi_table_parse_madt(ACPI_MADT_TYPE_LPC_PIC, pch_lpc_parse_madt, 0);
> + if (r < 0)
> + return r;
> +
> return 0;
> }
>
> @@ -364,7 +367,7 @@ int __init pch_pic_acpi_init(struct irq_domain *parent,
> }
>
> if (acpi_pchpic->id == 0)
> - acpi_cascade_irqdomain_init();
> + ret = acpi_cascade_irqdomain_init();
>
> return ret;
> }
> --
> 2.31.1
>

2022-11-28 12:04:37

by tip-bot2 for Jacob Pan

[permalink] [raw]
Subject: [irqchip: irq/irqchip-next] irqchip/loongarch: Adjust acpi_cascade_irqdomain_init() and sub-routines

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

Commit-ID: 3d12938dbc048ecb193fec69898d95f6b4813a4b
Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/3d12938dbc048ecb193fec69898d95f6b4813a4b
Author: Huacai Chen <[email protected]>
AuthorDate: Thu, 20 Oct 2022 22:25:14 +08:00
Committer: Marc Zyngier <[email protected]>
CommitterDate: Mon, 28 Nov 2022 11:49:31

irqchip/loongarch: Adjust acpi_cascade_irqdomain_init() and sub-routines

1, Adjust the return of acpi_cascade_irqdomain_init() and check its
return value.
2, Combine unnecessary short lines to one long line.

Signed-off-by: Huacai Chen <[email protected]>
Signed-off-by: Marc Zyngier <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
---
drivers/irqchip/irq-loongarch-cpu.c | 30 +++++++++++++++----------
drivers/irqchip/irq-loongson-eiointc.c | 30 ++++++++++++++-----------
drivers/irqchip/irq-loongson-pch-pic.c | 15 +++++++------
3 files changed, 44 insertions(+), 31 deletions(-)

diff --git a/drivers/irqchip/irq-loongarch-cpu.c b/drivers/irqchip/irq-loongarch-cpu.c
index 741612b..fdec3e9 100644
--- a/drivers/irqchip/irq-loongarch-cpu.c
+++ b/drivers/irqchip/irq-loongarch-cpu.c
@@ -92,18 +92,16 @@ static const struct irq_domain_ops loongarch_cpu_intc_irq_domain_ops = {
.xlate = irq_domain_xlate_onecell,
};

-static int __init
-liointc_parse_madt(union acpi_subtable_headers *header,
- const unsigned long end)
+static int __init liointc_parse_madt(union acpi_subtable_headers *header,
+ const unsigned long end)
{
struct acpi_madt_lio_pic *liointc_entry = (struct acpi_madt_lio_pic *)header;

return liointc_acpi_init(irq_domain, liointc_entry);
}

-static int __init
-eiointc_parse_madt(union acpi_subtable_headers *header,
- const unsigned long end)
+static int __init eiointc_parse_madt(union acpi_subtable_headers *header,
+ const unsigned long end)
{
struct acpi_madt_eio_pic *eiointc_entry = (struct acpi_madt_eio_pic *)header;

@@ -112,16 +110,24 @@ eiointc_parse_madt(union acpi_subtable_headers *header,

static int __init acpi_cascade_irqdomain_init(void)
{
- acpi_table_parse_madt(ACPI_MADT_TYPE_LIO_PIC,
- liointc_parse_madt, 0);
- acpi_table_parse_madt(ACPI_MADT_TYPE_EIO_PIC,
- eiointc_parse_madt, 0);
+ int r;
+
+ r = acpi_table_parse_madt(ACPI_MADT_TYPE_LIO_PIC, liointc_parse_madt, 0);
+ if (r < 0)
+ return r;
+
+ r = acpi_table_parse_madt(ACPI_MADT_TYPE_EIO_PIC, eiointc_parse_madt, 0);
+ if (r < 0)
+ return r;
+
return 0;
}

static int __init cpuintc_acpi_init(union acpi_subtable_headers *header,
const unsigned long end)
{
+ int ret;
+
if (irq_domain)
return 0;

@@ -139,9 +145,9 @@ static int __init cpuintc_acpi_init(union acpi_subtable_headers *header,
set_handle_irq(&handle_cpu_irq);
acpi_set_irq_model(ACPI_IRQ_MODEL_LPIC, lpic_get_gsi_domain_id);
acpi_set_gsi_to_irq_fallback(lpic_gsi_to_irq);
- acpi_cascade_irqdomain_init();
+ ret = acpi_cascade_irqdomain_init();

- return 0;
+ return ret;
}

IRQCHIP_ACPI_DECLARE(cpuintc_v1, ACPI_MADT_TYPE_CORE_PIC,
diff --git a/drivers/irqchip/irq-loongson-eiointc.c b/drivers/irqchip/irq-loongson-eiointc.c
index 5cf4b80..d15fd38 100644
--- a/drivers/irqchip/irq-loongson-eiointc.c
+++ b/drivers/irqchip/irq-loongson-eiointc.c
@@ -333,9 +333,8 @@ static struct syscore_ops eiointc_syscore_ops = {
.resume = eiointc_resume,
};

-static int __init
-pch_pic_parse_madt(union acpi_subtable_headers *header,
- const unsigned long end)
+static int __init pch_pic_parse_madt(union acpi_subtable_headers *header,
+ const unsigned long end)
{
struct acpi_madt_bio_pic *pchpic_entry = (struct acpi_madt_bio_pic *)header;
unsigned int node = (pchpic_entry->address >> 44) & 0xf;
@@ -347,9 +346,8 @@ pch_pic_parse_madt(union acpi_subtable_headers *header,
return -EINVAL;
}

-static int __init
-pch_msi_parse_madt(union acpi_subtable_headers *header,
- const unsigned long end)
+static int __init pch_msi_parse_madt(union acpi_subtable_headers *header,
+ const unsigned long end)
{
struct acpi_madt_msi_pic *pchmsi_entry = (struct acpi_madt_msi_pic *)header;
struct irq_domain *parent = acpi_get_vec_parent(eiointc_priv[nr_pics - 1]->node, msi_group);
@@ -362,17 +360,23 @@ pch_msi_parse_madt(union acpi_subtable_headers *header,

static int __init acpi_cascade_irqdomain_init(void)
{
- acpi_table_parse_madt(ACPI_MADT_TYPE_BIO_PIC,
- pch_pic_parse_madt, 0);
- acpi_table_parse_madt(ACPI_MADT_TYPE_MSI_PIC,
- pch_msi_parse_madt, 1);
+ int r;
+
+ r = acpi_table_parse_madt(ACPI_MADT_TYPE_BIO_PIC, pch_pic_parse_madt, 0);
+ if (r < 0)
+ return r;
+
+ r = acpi_table_parse_madt(ACPI_MADT_TYPE_MSI_PIC, pch_msi_parse_madt, 1);
+ if (r < 0)
+ return r;
+
return 0;
}

int __init eiointc_acpi_init(struct irq_domain *parent,
struct acpi_madt_eio_pic *acpi_eiointc)
{
- int i, parent_irq;
+ int i, ret, parent_irq;
unsigned long node_map;
struct eiointc_priv *priv;

@@ -419,9 +423,9 @@ int __init eiointc_acpi_init(struct irq_domain *parent,

acpi_set_vec_parent(acpi_eiointc->node, priv->eiointc_domain, pch_group);
acpi_set_vec_parent(acpi_eiointc->node, priv->eiointc_domain, msi_group);
- acpi_cascade_irqdomain_init();
+ ret = acpi_cascade_irqdomain_init();

- return 0;
+ return ret;

out_free_handle:
irq_domain_free_fwnode(priv->domain_handle);
diff --git a/drivers/irqchip/irq-loongson-pch-pic.c b/drivers/irqchip/irq-loongson-pch-pic.c
index 1fd015e..437f1af 100644
--- a/drivers/irqchip/irq-loongson-pch-pic.c
+++ b/drivers/irqchip/irq-loongson-pch-pic.c
@@ -378,9 +378,8 @@ int find_pch_pic(u32 gsi)
return -1;
}

-static int __init
-pch_lpc_parse_madt(union acpi_subtable_headers *header,
- const unsigned long end)
+static int __init pch_lpc_parse_madt(union acpi_subtable_headers *header,
+ const unsigned long end)
{
struct acpi_madt_lpc_pic *pchlpc_entry = (struct acpi_madt_lpc_pic *)header;

@@ -389,8 +388,12 @@ pch_lpc_parse_madt(union acpi_subtable_headers *header,

static int __init acpi_cascade_irqdomain_init(void)
{
- acpi_table_parse_madt(ACPI_MADT_TYPE_LPC_PIC,
- pch_lpc_parse_madt, 0);
+ int r;
+
+ r = acpi_table_parse_madt(ACPI_MADT_TYPE_LPC_PIC, pch_lpc_parse_madt, 0);
+ if (r < 0)
+ return r;
+
return 0;
}

@@ -417,7 +420,7 @@ int __init pch_pic_acpi_init(struct irq_domain *parent,
}

if (acpi_pchpic->id == 0)
- acpi_cascade_irqdomain_init();
+ ret = acpi_cascade_irqdomain_init();

return ret;
}