public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ACPI: EC: clean up tmp variable before reuse
@ 2008-10-31 18:42 Alexey Starikovskiy
  2008-11-03  8:02 ` Zhao Yakui
                   ` (7 more replies)
  0 siblings, 8 replies; 37+ messages in thread
From: Alexey Starikovskiy @ 2008-10-31 18:42 UTC (permalink / raw)
  To: LenBrown; +Cc: Linux-acpi

Fix breakage introduced by following patch
27663c5855b10af9ec67bc7dfba001426ba21222 is first bad commit
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.

References: http://bugzilla.kernel.org/show_bug.cgi?id=11917
	    http://bugzilla.kernel.org/show_bug.cgi?id=11896

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Tested-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
---

 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 ef42316..523ac5b 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -736,7 +736,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,
@@ -751,6 +751,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;


^ permalink raw reply related	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2009-01-20  2:52 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-31 18:42 [PATCH] ACPI: EC: clean up tmp variable before reuse Alexey Starikovskiy
2008-11-03  8:02 ` Zhao Yakui
2008-11-03  8:24 ` [PATCH]: ACPI: Initialize EC global lock based on the return value of _GLK Zhao Yakui
2008-11-04  7:41 ` [PATCH]: ACPI Cleanup :Initialize EC global lock based on the return status Zhao Yakui
2008-11-04  8:05   ` Alexey Starikovskiy
2008-11-04  8:58     ` Rafael J. Wysocki
2008-11-04  9:21       ` Alexey Starikovskiy
2008-11-04  9:37     ` Zhao Yakui
2008-11-04  9:38       ` Alexey Starikovskiy
2008-11-05  1:05         ` Zhao Yakui
2008-11-05  7:24           ` Alexey Starikovskiy
2008-12-17  8:55 ` [PATCH] : ACPI : Use RSDT instead of XSDT by adding boot option of "acpi=rsdt" Zhao Yakui
2009-01-09  6:35   ` Len Brown
2009-01-09 10:54     ` Thomas Renninger
2009-01-09 10:59       ` Len Brown
2009-01-09 12:16         ` Thomas Renninger
2009-01-09 12:34           ` Matthew Garrett
2009-01-12 14:13             ` Thomas Renninger
2009-01-12 14:16               ` Matthew Garrett
2009-01-12 22:17                 ` Thomas Renninger
2009-01-12 23:38                   ` Matthew Garrett
2009-01-09 10:58   ` Blacklist known broken machines to use the rsdt and enabled Cstates on R40e Thomas Renninger
2009-01-09 10:58   ` [PATCH 1/2] Blacklist known broken machines (ThinkPad R40e and R50e) to use rsdt instead xsdt Thomas Renninger
2009-01-09 10:58   ` [PATCH 2/2] R40e using rsdt (previous patch) makes all Cstates work -> remove blacklisting Thomas Renninger
2008-12-30  4:01 ` [PATCH] : ACPI : Add the MWAIT C-state mask to avoid overflow Zhao Yakui
2009-01-04  4:04 ` Zhao Yakui
2009-01-09  6:28   ` Len Brown
2009-01-12  7:07 ` [PATCH] : ACPI : Use clocksource to get the C-state time instead of ACPI PM timer Zhao Yakui
2009-01-12  7:58   ` Rafael J. Wysocki
2009-01-12  9:31     ` Zhao Yakui
2009-01-12 12:27       ` Rafael J. Wysocki
2009-01-12  9:39     ` Zhao Yakui
2009-01-12 22:09   ` Pallipadi, Venkatesh
2009-01-13  1:26     ` Zhao Yakui
2009-01-13  1:42     ` Zhao Yakui
2009-01-13  3:50 ` [RESEND] " Zhao Yakui
2009-01-20  2:52   ` Len Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox