aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/namespace
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/namespace')
-rw-r--r--drivers/acpi/namespace/nseval.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/acpi/namespace/nseval.c b/drivers/acpi/namespace/nseval.c
index 0a1ae670a847..42dae12f2ef8 100644
--- a/drivers/acpi/namespace/nseval.c
+++ b/drivers/acpi/namespace/nseval.c
@@ -148,21 +148,22 @@ acpi_status acpi_ns_evaluate(struct acpi_evaluate_info * info)
148 info->param_count++; 148 info->param_count++;
149 } 149 }
150 150
151 /* Error if too few arguments were passed in */ 151 /*
152 * Warning if too few or too many arguments have been passed by the
153 * caller. We don't want to abort here with an error because an
154 * incorrect number of arguments may not cause the method to fail.
155 * However, the method will fail if there are too few arguments passed
156 * and the method attempts to use one of the missing ones.
157 */
152 158
153 if (info->param_count < info->obj_desc->method.param_count) { 159 if (info->param_count < info->obj_desc->method.param_count) {
154 ACPI_ERROR((AE_INFO, 160 ACPI_WARNING((AE_INFO,
155 "Insufficient arguments - " 161 "Insufficient arguments - "
156 "method [%4.4s] needs %d, found %d", 162 "method [%4.4s] needs %d, found %d",
157 acpi_ut_get_node_name(info->resolved_node), 163 acpi_ut_get_node_name(info->resolved_node),
158 info->obj_desc->method.param_count, 164 info->obj_desc->method.param_count,
159 info->param_count)); 165 info->param_count));
160 return_ACPI_STATUS(AE_MISSING_ARGUMENTS); 166 } else if (info->param_count >
161 }
162
163 /* Just a warning if too many arguments */
164
165 else if (info->param_count >
166 info->obj_desc->method.param_count) { 167 info->obj_desc->method.param_count) {
167 ACPI_WARNING((AE_INFO, 168 ACPI_WARNING((AE_INFO,
168 "Excess arguments - " 169 "Excess arguments - "