[PATCH] acpi: method: _CST test checks for wrong number of package elements

Colin King colin.king at canonical.com
Tue Jan 8 19:52:47 UTC 2013


From: Colin Ian King <colin.king at canonical.com>

After running this through some of the various tables in my collection
I discovered that the _CST test checks for the number of elements
incorrectly.  This fixes an off-by-one error.

Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
 src/acpi/method/method.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
index 2ac3155..fd7aac0 100644
--- a/src/acpi/method/method.c
+++ b/src/acpi/method/method.c
@@ -2423,7 +2423,7 @@ static void method_test_CST_return(
 		return;
 
 	/* _CST has at least two elements */
-	if (obj->Package.Count < 3) {
+	if (obj->Package.Count < 2) {
 		fwts_failed(fw, LOG_LEVEL_MEDIUM, "Method_CSTElementCount",
 			"%s should return package of at least 2 elements, "
 			"got %" PRIu32 " elements instead.",
-- 
1.8.0




More information about the fwts-devel mailing list