From ab5a4500b12e6a5534518ff736fe0ebc382daf5c Mon Sep 17 00:00:00 2001 From: Carlos Corbacho Date: Sun, 24 Feb 2008 13:34:34 +0000 Subject: [PATCH] --- yaml --- r: 87339 b: refs/heads/master c: a527f2d7fe58ce95bfec998f3dc6f658c777a2f2 h: refs/heads/master i: 87337: 68b5401980e00bec4ff3094aa2bee8ef501ff41a 87335: 6d294092f615917f6dc9feed4f70bfbec4ff4b2b v: v3 --- [refs] | 2 +- trunk/drivers/acpi/wmi.c | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 1260da9a0c35..c383b11b68ec 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9b963c40306ba6967650dce99f4e823f1da49a60 +refs/heads/master: a527f2d7fe58ce95bfec998f3dc6f658c777a2f2 diff --git a/trunk/drivers/acpi/wmi.c b/trunk/drivers/acpi/wmi.c index efacc9f8bfe3..c33b1c6e93b1 100644 --- a/trunk/drivers/acpi/wmi.c +++ b/trunk/drivers/acpi/wmi.c @@ -293,7 +293,7 @@ struct acpi_buffer *out) { struct guid_block *block = NULL; struct wmi_block *wblock = NULL; - acpi_handle handle; + acpi_handle handle, wc_handle; acpi_status status, wc_status = AE_ERROR; struct acpi_object_list input, wc_input; union acpi_object wc_params[1], wq_params[1]; @@ -338,8 +338,10 @@ struct acpi_buffer *out) * expensive, but have no corresponding WCxx method. So we * should not fail if this happens. */ - wc_status = acpi_evaluate_object(handle, wc_method, - &wc_input, NULL); + wc_status = acpi_get_handle(handle, wc_method, &wc_handle); + if (ACPI_SUCCESS(wc_status)) + wc_status = acpi_evaluate_object(handle, wc_method, + &wc_input, NULL); } strcpy(method, "WQ"); @@ -351,7 +353,7 @@ struct acpi_buffer *out) * If ACPI_WMI_EXPENSIVE, call the relevant WCxx method, even if * the WQxx method failed - we should disable collection anyway. */ - if ((block->flags & ACPI_WMI_EXPENSIVE) && wc_status) { + if ((block->flags & ACPI_WMI_EXPENSIVE) && ACPI_SUCCESS(wc_status)) { wc_params[0].integer.value = 0; status = acpi_evaluate_object(handle, wc_method, &wc_input, NULL);