X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Facpi%2Futilities%2Futeval.c;h=ead27d2c4d18b17d39457392042203611e01b830;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=0aa1fde7ec49aa74a63ce786f148d3775a19ac48;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/drivers/acpi/utilities/uteval.c b/drivers/acpi/utilities/uteval.c index 0aa1fde7e..ead27d2c4 100644 --- a/drivers/acpi/utilities/uteval.c +++ b/drivers/acpi/utilities/uteval.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2004, R. Byron Moore + * Copyright (C) 2000 - 2005, R. Byron Moore * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -198,6 +198,17 @@ acpi_ut_evaluate_object ( break; } + if ((acpi_gbl_enable_interpreter_slack) && + (!expected_return_btypes)) { + /* + * 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. + */ + acpi_ut_remove_reference (info.return_object); + return_ACPI_STATUS (AE_OK); + } + /* Is the return object one of the expected types? */ if (!(expected_return_btypes & return_btype)) { @@ -205,8 +216,9 @@ acpi_ut_evaluate_object ( prefix_node, path, AE_TYPE); ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, - "Type returned from %s was incorrect: %X\n", - path, ACPI_GET_OBJECT_TYPE (info.return_object))); + "Type returned from %s was incorrect: %s, expected Btypes: %X\n", + path, acpi_ut_get_object_type_name (info.return_object), + expected_return_btypes)); /* On error exit, we must delete the return object */