From e3819b73cc078bd4c832800a9b74737602f04fe7 Mon Sep 17 00:00:00 2001 From: aystarik Date: Wed, 29 Jun 2005 19:11:14 +0000 Subject: [PATCH] Implicit return fix - AE_OK if object returned, but was not expected. date 2005.01.21.22.43.00; author rmoore1; state Exp; --- source/components/utilities/uteval.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/source/components/utilities/uteval.c b/source/components/utilities/uteval.c index eee5033d7..ffe656b91 100644 --- a/source/components/utilities/uteval.c +++ b/source/components/utilities/uteval.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: uteval - Object evaluation - * $Revision: 1.55 $ + * $Revision: 1.57 $ * *****************************************************************************/ @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2004, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp. * All rights reserved. * * 2. License @@ -282,6 +282,18 @@ AcpiUtEvaluateObject ( break; } + if ((AcpiGbl_EnableInterpreterSlack) && + (!ExpectedReturnBtypes)) + { + /* + * We received a return object, but one was not expected. This can + * happen frequently if the "implicit return" feature is enabled. + * Just delete the return object and return AE_OK. + */ + AcpiUtRemoveReference (Info.ReturnObject); + return_ACPI_STATUS (AE_OK); + } + /* Is the return object one of the expected types? */ if (!(ExpectedReturnBtypes & ReturnBtype))