Skip to content

Commit

Permalink
ACPI EC: Fix regression due to use of uninitialized variable
Browse files Browse the repository at this point in the history
breakage introduced by following patch
commit 27663c5
Author: Matthew Wilcox <[email protected]>
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 <[email protected]>
Tested-by: Alan Jenkins <[email protected]>
Signed-off-by: Len Brown <[email protected]>
  • Loading branch information
Alexey Starikovskiy authored and lenb committed Nov 7, 2008
1 parent 457d2ee commit d21cf3c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/acpi/ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
Expand Down

0 comments on commit d21cf3c

Please sign in to comment.