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

Keng-Yu Lin kengyu at canonical.com
Wed Jan 23 07:22:51 UTC 2013


On Wed, Jan 9, 2013 at 3:52 AM, Colin King <colin.king at canonical.com> wrote:
> 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
>
Acked-by: Keng-Yu Lin <kengyu at canonical.com>



More information about the fwts-devel mailing list