diff options
author | Alexey Starikovskiy <astarikovskiy@suse.de> | 2008-11-03 14:26:40 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-11-07 14:45:00 -0500 |
commit | d21cf3c16b1191f3154a51e0b20c82bf851cc553 (patch) | |
tree | 8b70490cff2ac98f1106c61f342aef6c0db544a3 | |
parent | 457d2ee225801441e96f2e35894ec404572ad862 (diff) |
ACPI EC: Fix regression due to use of uninitialized variable
breakage introduced by following patch
commit 27663c5855b10af9ec67bc7dfba001426ba21222
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=11917
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Tested-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r-- | drivers/acpi/ec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index ef42316f89f5..523ac5b229a5 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -736,7 +736,7 @@ static acpi_status | |||
736 | ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval) | 736 | ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval) |
737 | { | 737 | { |
738 | acpi_status status; | 738 | acpi_status status; |
739 | unsigned long long tmp; | 739 | unsigned long long tmp = 0; |
740 | 740 | ||
741 | struct acpi_ec *ec = context; | 741 | struct acpi_ec *ec = context; |
742 | status = acpi_walk_resources(handle, METHOD_NAME__CRS, | 742 | 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 | return status; | 751 | return status; |
752 | ec->gpe = tmp; | 752 | ec->gpe = tmp; |
753 | /* Use the global lock for all EC transactions? */ | 753 | /* Use the global lock for all EC transactions? */ |
754 | tmp = 0; | ||
754 | acpi_evaluate_integer(handle, "_GLK", NULL, &tmp); | 755 | acpi_evaluate_integer(handle, "_GLK", NULL, &tmp); |
755 | ec->global_lock = tmp; | 756 | ec->global_lock = tmp; |
756 | ec->handle = handle; | 757 | ec->handle = handle; |