diff mbox series

acpi: method: NIH method output buffer should be 4 bytes

Message ID 20230216042436.8723-1-ivan.hu@canonical.com
State Accepted
Headers show
Series acpi: method: NIH method output buffer should be 4 bytes | expand

Commit Message

ivanhu Feb. 16, 2023, 4:24 a.m. UTC
BugLink: https://bugs.launchpad.net/fwts/+bug/2007472

From the ACPI spec definition of _NIH method, the length of _NIH output
buffer is 4 bytes ,not 64 bytes.

Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
---
 src/lib/src/fwts_acpi_object_eval.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/lib/src/fwts_acpi_object_eval.c b/src/lib/src/fwts_acpi_object_eval.c
index 2882d8fd..ffe40443 100644
--- a/src/lib/src/fwts_acpi_object_eval.c
+++ b/src/lib/src/fwts_acpi_object_eval.c
@@ -2602,7 +2602,7 @@  void fwts_method_test_NIH_return(
 	if (fwts_method_check_type(fw, name, buf, ACPI_TYPE_BUFFER) != FWTS_OK)
 		return;
 
-	if (fwts_method_buffer_size(fw, name, obj, 64) != FWTS_OK)
+	if (fwts_method_buffer_size(fw, name, obj, 4) != FWTS_OK)
 		passed = false;
 
 	ret = (nih_return_t *) obj->Buffer.Pointer;