public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexey Starikovskiy <astarikovskiy@suse.de>
To: LenBrown <lenb@kernel.org>
Cc: Linux-acpi@vger.kernel.org
Subject: [PATCH 1/5] ACPI: EC: clean up tmp variable before reuse
Date: Sun, 09 Nov 2008 19:00:36 +0300	[thread overview]
Message-ID: <20081109160036.13635.34455.stgit@thinkpad> (raw)
In-Reply-To: <20081109155847.13635.15244.stgit@thinkpad>

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;


       reply	other threads:[~2008-11-09 16:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20081109155847.13635.15244.stgit@thinkpad>
2008-11-09 16:00 ` Alexey Starikovskiy [this message]
2008-11-10 20:53   ` [PATCH 1/5] ACPI: EC: clean up tmp variable before reuse Len Brown
2008-11-09 16:00 ` [PATCH 2/5] ACPI: EC: revert msleep patch Alexey Starikovskiy
2008-11-09 16:00 ` [PATCH 3/5] ACPI: EC: wait for last write gpe Alexey Starikovskiy
2008-11-11 18:26   ` Len Brown
2008-11-11 20:13     ` Alexey Starikovskiy
2008-11-12  1:34     ` Zhao Yakui
2008-11-09 16:00 ` [PATCH 4/5] ACPI: EC: restart failed command Alexey Starikovskiy
2008-11-10 21:09   ` Alexey Starikovskiy
2008-11-11 18:10   ` Len Brown
2008-11-09 16:01 ` [PATCH 5/5] ACPI: EC: lower interrupt storm treshold Alexey Starikovskiy
2008-11-11 18:12   ` Len Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081109160036.13635.34455.stgit@thinkpad \
    --to=astarikovskiy@suse.de \
    --cc=Linux-acpi@vger.kernel.org \
    --cc=lenb@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox