From patchwork Tue Jan 8 19:52:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: acpi: method: _CST test checks for wrong number of package elements Date: Tue, 08 Jan 2013 09:52:47 -0000 From: Colin King X-Patchwork-Id: 210487 Message-Id: <1357674767-29828-1-git-send-email-colin.king@canonical.com> To: fwts-devel@lists.ubuntu.com From: Colin Ian King 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 Acked-by: Keng-Yu Lin Acked-by: Ivan Hu --- 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.",