From 5714dda455cfe8506813759fe58a0a945af60171 Mon Sep 17 00:00:00 2001 From: Henrique de Moraes Holschuh Date: Sun, 16 May 2010 19:45:45 -0300 Subject: [PATCH] --- yaml --- r: 197552 b: refs/heads/master c: 263f4a30e4f1dc5385650738c1dcf3728036ecc4 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/platform/x86/thinkpad_acpi.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 3ae410e61b32..d32d3e0cc700 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 437e470c4ca818c97426afa3a67fbd7e34cffe00 +refs/heads/master: 263f4a30e4f1dc5385650738c1dcf3728036ecc4 diff --git a/trunk/drivers/platform/x86/thinkpad_acpi.c b/trunk/drivers/platform/x86/thinkpad_acpi.c index 877a7802e830..da3a70b280f2 100644 --- a/trunk/drivers/platform/x86/thinkpad_acpi.c +++ b/trunk/drivers/platform/x86/thinkpad_acpi.c @@ -605,9 +605,10 @@ static int acpi_evalf(acpi_handle handle, switch (res_type) { case 'd': /* int */ - if (res) + success = (status == AE_OK && + out_obj.type == ACPI_TYPE_INTEGER); + if (success && res) *(int *)res = out_obj.integer.value; - success = status == AE_OK && out_obj.type == ACPI_TYPE_INTEGER; break; case 'v': /* void */ success = status == AE_OK; @@ -620,8 +621,8 @@ static int acpi_evalf(acpi_handle handle, } if (!success && !quiet) - printk(TPACPI_ERR "acpi_evalf(%s, %s, ...) failed: %d\n", - method, fmt0, status); + printk(TPACPI_ERR "acpi_evalf(%s, %s, ...) failed: %s\n", + method, fmt0, acpi_format_exception(status)); return success; }