aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/thinkpad_acpi.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 877a7802e830..da3a70b280f2 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -605,9 +605,10 @@ static int acpi_evalf(acpi_handle handle,
605 605
606 switch (res_type) { 606 switch (res_type) {
607 case 'd': /* int */ 607 case 'd': /* int */
608 if (res) 608 success = (status == AE_OK &&
609 out_obj.type == ACPI_TYPE_INTEGER);
610 if (success && res)
609 *(int *)res = out_obj.integer.value; 611 *(int *)res = out_obj.integer.value;
610 success = status == AE_OK && out_obj.type == ACPI_TYPE_INTEGER;
611 break; 612 break;
612 case 'v': /* void */ 613 case 'v': /* void */
613 success = status == AE_OK; 614 success = status == AE_OK;
@@ -620,8 +621,8 @@ static int acpi_evalf(acpi_handle handle,
620 } 621 }
621 622
622 if (!success && !quiet) 623 if (!success && !quiet)
623 printk(TPACPI_ERR "acpi_evalf(%s, %s, ...) failed: %d\n", 624 printk(TPACPI_ERR "acpi_evalf(%s, %s, ...) failed: %s\n",
624 method, fmt0, status); 625 method, fmt0, acpi_format_exception(status));
625 626
626 return success; 627 return success;
627} 628}