mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
ACPICA: Fix parameter validation for acpi_read/write
Now return AE_BAD_PARAMETER if the input register pointer is null, and AE_BAD_ADDRESS if the register has an address of zero. Previously, these cases simply returned AE_OK. For optional registers such as PM1B status/enable/control, the caller should check for a valid register address before calling. ACPICA BZ 748. http://www.acpica.org/bugzilla/show_bug.cgi?id=748 Signed-off-by: Bob Moore <[email protected]> Signed-off-by: Lin Ming <[email protected]> Signed-off-by: Len Brown <[email protected]>
This commit is contained in:
parent
aefc7f9a02
commit
ac0c845026
2 changed files with 12 additions and 12 deletions
|
|
@ -103,8 +103,9 @@
|
|||
#define AE_BAD_OCTAL_CONSTANT (acpi_status) (0x0006 | AE_CODE_PROGRAMMER)
|
||||
#define AE_BAD_DECIMAL_CONSTANT (acpi_status) (0x0007 | AE_CODE_PROGRAMMER)
|
||||
#define AE_MISSING_ARGUMENTS (acpi_status) (0x0008 | AE_CODE_PROGRAMMER)
|
||||
#define AE_BAD_ADDRESS (acpi_status) (0x0009 | AE_CODE_PROGRAMMER)
|
||||
|
||||
#define AE_CODE_PGM_MAX 0x0008
|
||||
#define AE_CODE_PGM_MAX 0x0009
|
||||
|
||||
/*
|
||||
* Acpi table exceptions
|
||||
|
|
@ -224,7 +225,8 @@ char const *acpi_gbl_exception_names_pgm[] = {
|
|||
"AE_BAD_HEX_CONSTANT",
|
||||
"AE_BAD_OCTAL_CONSTANT",
|
||||
"AE_BAD_DECIMAL_CONSTANT",
|
||||
"AE_MISSING_ARGUMENTS"
|
||||
"AE_MISSING_ARGUMENTS",
|
||||
"AE_BAD_ADDRESS"
|
||||
};
|
||||
|
||||
char const *acpi_gbl_exception_names_tbl[] = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue