From: Alexey Starikovskiy Date: Mon, 3 Nov 2008 19:26:40 +0000 (-0500) Subject: ACPI EC: Fix regression due to use of uninitialized variable X-Git-Tag: v2.6.27.15~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c17b1f3e00077f32e6369f750c491c00e08e23f5;p=thirdparty%2Fkernel%2Fstable.git ACPI EC: Fix regression due to use of uninitialized variable commit d21cf3c16b1191f3154a51e0b20c82bf851cc553 upstream. breakage introduced by following patch commit 27663c5855b10af9ec67bc7dfba001426ba21222 Author: Matthew Wilcox 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 Tested-by: Alan Jenkins Signed-off-by: Len Brown Cc: Thomas Renninger Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index c20c94f59cc09..566206a256dc3 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -769,7 +769,7 @@ static acpi_status ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval) { acpi_status status; - unsigned long long tmp; + unsigned long long tmp = 0; struct acpi_ec *ec = context; status = acpi_walk_resources(handle, METHOD_NAME__CRS, @@ -784,6 +784,7 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval) return status; ec->gpe = tmp; /* Use the global lock for all EC transactions? */ + tmp = 0; acpi_evaluate_integer(handle, "_GLK", NULL, &tmp); ec->global_lock = tmp; ec->handle = handle;