From f3300640c63df138d133740b54e2c0a1befa4086 Mon Sep 17 00:00:00 2001 From: Erik Schmauss Date: Tue, 27 Jun 2017 14:06:14 -0700 Subject: [PATCH] Revert "Update resource descriptor handling" This reverts commit c8eac10178b387f9eb1935694e509d4518da77bb. --- source/components/utilities/utresrc.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/source/components/utilities/utresrc.c b/source/components/utilities/utresrc.c index 8131cde2f8..e34662c809 100644 --- a/source/components/utilities/utresrc.c +++ b/source/components/utilities/utresrc.c @@ -303,11 +303,9 @@ AcpiUtWalkAmlResources ( ACPI_FUNCTION_TRACE (UtWalkAmlResources); - /* - * The absolute minimum resource template is one EndTag descriptor. - * However, we will treat a lone EndTag as just a simple buffer. - */ - if (AmlLength <= sizeof (AML_RESOURCE_END_TAG)) + /* The absolute minimum resource template is one EndTag descriptor */ + + if (AmlLength < sizeof (AML_RESOURCE_END_TAG)) { return_ACPI_STATUS (AE_AML_NO_RESOURCE_END_TAG); } @@ -378,10 +376,8 @@ AcpiUtWalkAmlResources ( *Context = Aml; } - /* - * Normal exit. Note: We allow the buffer to be larger than - * the resource template, as long as the END_TAG exists. - */ + /* Normal exit */ + return_ACPI_STATUS (AE_OK); }