ACK: [PATCH 1/2] lib: fwts_acpi_object_eval: Do not return FWTS_OK if method lookup fails
ivanhu
ivan.hu at canonical.com
Tue Oct 8 05:55:37 UTC 2024
Acked-by: Ivan Hu <ivan.hu at canonical.com>
On 10/6/24 07:37, Armin Wolf wrote:
> If for some reason the lookup of an ACPI method fails with an error
> different than AE_NOT_FOUND, FWTS_OK is returned.
>
> Fix this by instead returning FWTS_ERROR in such cases.
>
> Signed-off-by: Armin Wolf <W_Armin at gmx.de>
> ---
> src/lib/src/fwts_acpi_object_eval.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/src/lib/src/fwts_acpi_object_eval.c b/src/lib/src/fwts_acpi_object_eval.c
> index 37f67eb8..1c2de735 100644
> --- a/src/lib/src/fwts_acpi_object_eval.c
> +++ b/src/lib/src/fwts_acpi_object_eval.c
> @@ -1222,6 +1222,13 @@ int fwts_evaluate_method(fwts_framework *fw,
> }
> }
>
> + if (ACPI_FAILURE(status)) {
> + const char *exception = AcpiFormatException(status);
> + fwts_log_info(fw, "ACPICA Exception %s during lookup of method %s",
> + exception, name);
> + return FWTS_ERROR;
> + }
> +
> return FWTS_OK;
> }
>
> --
> 2.39.5
>
>
More information about the fwts-devel
mailing list