提交 d21cf3c1 编写于 作者: A Alexey Starikovskiy 提交者: Len Brown

ACPI EC: Fix regression due to use of uninitialized variable

breakage introduced by following patch
commit 27663c58
Author: Matthew Wilcox <willy@linux.intel.com>
Date:   Fri Oct 10 02:22:59 2008 -0400

acpi_evaluate_integer() does not clear passed variable if
there is an error at evaluation.
So if we ignore error, we must supply initialized variable.

http://bugzilla.kernel.org/show_bug.cgi?id=11917Signed-off-by: NAlexey Starikovskiy <astarikovskiy@suse.de>
Tested-by: NAlan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 457d2ee2
...@@ -736,7 +736,7 @@ static acpi_status ...@@ -736,7 +736,7 @@ static acpi_status
ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval) ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
{ {
acpi_status status; acpi_status status;
unsigned long long tmp; unsigned long long tmp = 0;
struct acpi_ec *ec = context; struct acpi_ec *ec = context;
status = acpi_walk_resources(handle, METHOD_NAME__CRS, status = acpi_walk_resources(handle, METHOD_NAME__CRS,
...@@ -751,6 +751,7 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval) ...@@ -751,6 +751,7 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
return status; return status;
ec->gpe = tmp; ec->gpe = tmp;
/* Use the global lock for all EC transactions? */ /* Use the global lock for all EC transactions? */
tmp = 0;
acpi_evaluate_integer(handle, "_GLK", NULL, &tmp); acpi_evaluate_integer(handle, "_GLK", NULL, &tmp);
ec->global_lock = tmp; ec->global_lock = tmp;
ec->handle = handle; ec->handle = handle;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册