diff options
Diffstat (limited to 'drivers/acpi/acpica/exfldio.c')
-rw-r--r-- | drivers/acpi/acpica/exfldio.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/acpi/acpica/exfldio.c b/drivers/acpi/acpica/exfldio.c index 19df8ce66ee7..2a524fc1e851 100644 --- a/drivers/acpi/acpica/exfldio.c +++ b/drivers/acpi/acpica/exfldio.c | |||
@@ -86,6 +86,7 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc, | |||
86 | { | 86 | { |
87 | acpi_status status = AE_OK; | 87 | acpi_status status = AE_OK; |
88 | union acpi_operand_object *rgn_desc; | 88 | union acpi_operand_object *rgn_desc; |
89 | u8 space_id; | ||
89 | 90 | ||
90 | ACPI_FUNCTION_TRACE_U32(ex_setup_region, field_datum_byte_offset); | 91 | ACPI_FUNCTION_TRACE_U32(ex_setup_region, field_datum_byte_offset); |
91 | 92 | ||
@@ -101,6 +102,17 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc, | |||
101 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); | 102 | return_ACPI_STATUS(AE_AML_OPERAND_TYPE); |
102 | } | 103 | } |
103 | 104 | ||
105 | space_id = rgn_desc->region.space_id; | ||
106 | |||
107 | /* Validate the Space ID */ | ||
108 | |||
109 | if (!acpi_is_valid_space_id(space_id)) { | ||
110 | ACPI_ERROR((AE_INFO, | ||
111 | "Invalid/unknown Address Space ID: 0x%2.2X", | ||
112 | space_id)); | ||
113 | return_ACPI_STATUS(AE_AML_INVALID_SPACE_ID); | ||
114 | } | ||
115 | |||
104 | /* | 116 | /* |
105 | * If the Region Address and Length have not been previously evaluated, | 117 | * If the Region Address and Length have not been previously evaluated, |
106 | * evaluate them now and save the results. | 118 | * evaluate them now and save the results. |
@@ -122,8 +134,8 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc, | |||
122 | * Exit now for SMBus or IPMI address space, it has a non-linear | 134 | * Exit now for SMBus or IPMI address space, it has a non-linear |
123 | * address space and the request cannot be directly validated | 135 | * address space and the request cannot be directly validated |
124 | */ | 136 | */ |
125 | if (rgn_desc->region.space_id == ACPI_ADR_SPACE_SMBUS || | 137 | if (space_id == ACPI_ADR_SPACE_SMBUS || |
126 | rgn_desc->region.space_id == ACPI_ADR_SPACE_IPMI) { | 138 | space_id == ACPI_ADR_SPACE_IPMI) { |
127 | 139 | ||
128 | /* SMBus or IPMI has a non-linear address space */ | 140 | /* SMBus or IPMI has a non-linear address space */ |
129 | 141 | ||