Commit 474821ca authored by Len Brown's avatar Len Brown

[ACPI] handle out of spec EC bit width

http://bugzilla.kernel.org/show_bug.cgi?id=1744Signed-off-by: default avatarLuming Yu <luming.yu@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent cb70bcab
/* /*
* acpi_ec.c - ACPI Embedded Controller Driver ($Revision: 38 $) * acpi_ec.c - ACPI Embedded Controller Driver ($Revision: 38 $)
* *
* Copyright (C) 2004 Luming Yu <luming.yu@intel.com>
* Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com> * Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
* Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com> * Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
* *
...@@ -441,9 +442,15 @@ acpi_ec_space_handler ( ...@@ -441,9 +442,15 @@ acpi_ec_space_handler (
ACPI_FUNCTION_TRACE("acpi_ec_space_handler"); ACPI_FUNCTION_TRACE("acpi_ec_space_handler");
if ((address > 0xFF) || (bit_width != 8) || !value || !handler_context) if ((address > 0xFF) || !value || !handler_context)
return_VALUE(AE_BAD_PARAMETER); return_VALUE(AE_BAD_PARAMETER);
if(bit_width != 8) {
printk(KERN_WARNING PREFIX "acpi_ec_space_handler: bit_width should be 8\n");
if (acpi_strict)
return_VALUE(AE_BAD_PARAMETER);
}
ec = (struct acpi_ec *) handler_context; ec = (struct acpi_ec *) handler_context;
switch (function) { switch (function) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment