Message ID | 20211116120201.247289-1-gjb@semihalf.com |
---|---|
State | Accepted |
Headers | show |
Series | acpi: madt: De-initialise ACPICA core engine in case of error. | expand |
On 2021-11-16 5:02 a.m., Grzegorz Bernacki wrote: > fwts_acpica_deinit() should be called if madt_init() fails. > > Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com> > --- > src/acpi/madt/madt.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/src/acpi/madt/madt.c b/src/acpi/madt/madt.c > index 7173023a..5892176b 100644 > --- a/src/acpi/madt/madt.c > +++ b/src/acpi/madt/madt.c > @@ -432,6 +432,9 @@ PRAGMA_NULL_PTR_MATH > PRAGMA_POP > AcpiGetDevices("ACPI0007", madt_processor_handler, NULL, NULL); > > + if (!spec_data) > + fwts_acpica_deinit(); > + > return (spec_data) ? FWTS_OK : FWTS_ERROR; > } > > Acked-by: Alex Hung <alex.hung@canonical.com>
On 11/16/21 8:02 PM, Grzegorz Bernacki wrote: > fwts_acpica_deinit() should be called if madt_init() fails. > > Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com> > --- > src/acpi/madt/madt.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/src/acpi/madt/madt.c b/src/acpi/madt/madt.c > index 7173023a..5892176b 100644 > --- a/src/acpi/madt/madt.c > +++ b/src/acpi/madt/madt.c > @@ -432,6 +432,9 @@ PRAGMA_NULL_PTR_MATH > PRAGMA_POP > AcpiGetDevices("ACPI0007", madt_processor_handler, NULL, NULL); > > + if (!spec_data) > + fwts_acpica_deinit(); > + > return (spec_data) ? FWTS_OK : FWTS_ERROR; > } > > Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff --git a/src/acpi/madt/madt.c b/src/acpi/madt/madt.c index 7173023a..5892176b 100644 --- a/src/acpi/madt/madt.c +++ b/src/acpi/madt/madt.c @@ -432,6 +432,9 @@ PRAGMA_NULL_PTR_MATH PRAGMA_POP AcpiGetDevices("ACPI0007", madt_processor_handler, NULL, NULL); + if (!spec_data) + fwts_acpica_deinit(); + return (spec_data) ? FWTS_OK : FWTS_ERROR; }
fwts_acpica_deinit() should be called if madt_init() fails. Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com> --- src/acpi/madt/madt.c | 3 +++ 1 file changed, 3 insertions(+)