aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/hwxface.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpica/hwxface.c')
-rw-r--r--drivers/acpi/acpica/hwxface.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/acpi/acpica/hwxface.c b/drivers/acpi/acpica/hwxface.c
index ae597c0ab53f..f67562ea0010 100644
--- a/drivers/acpi/acpica/hwxface.c
+++ b/drivers/acpi/acpica/hwxface.c
@@ -107,19 +107,18 @@ acpi_status acpi_read(u32 *value, struct acpi_generic_address *reg)
107 ACPI_FUNCTION_NAME(acpi_read); 107 ACPI_FUNCTION_NAME(acpi_read);
108 108
109 /* 109 /*
110 * Must have a valid pointer to a GAS structure, and 110 * Must have a valid pointer to a GAS structure, and a non-zero address
111 * a non-zero address within. However, don't return an error 111 * within.
112 * because the PM1A/B code must not fail if B isn't present.
113 */ 112 */
114 if (!reg) { 113 if (!reg) {
115 return (AE_OK); 114 return (AE_BAD_PARAMETER);
116 } 115 }
117 116
118 /* Get a local copy of the address. Handles possible alignment issues */ 117 /* Get a local copy of the address. Handles possible alignment issues */
119 118
120 ACPI_MOVE_64_TO_64(&address, &reg->address); 119 ACPI_MOVE_64_TO_64(&address, &reg->address);
121 if (!address) { 120 if (!address) {
122 return (AE_OK); 121 return (AE_BAD_ADDRESS);
123 } 122 }
124 123
125 /* Supported widths are 8/16/32 */ 124 /* Supported widths are 8/16/32 */
@@ -187,19 +186,18 @@ acpi_status acpi_write(u32 value, struct acpi_generic_address *reg)
187 ACPI_FUNCTION_NAME(acpi_write); 186 ACPI_FUNCTION_NAME(acpi_write);
188 187
189 /* 188 /*
190 * Must have a valid pointer to a GAS structure, and 189 * Must have a valid pointer to a GAS structure, and a non-zero address
191 * a non-zero address within. However, don't return an error 190 * within.
192 * because the PM1A/B code must not fail if B isn't present.
193 */ 191 */
194 if (!reg) { 192 if (!reg) {
195 return (AE_OK); 193 return (AE_BAD_PARAMETER);
196 } 194 }
197 195
198 /* Get a local copy of the address. Handles possible alignment issues */ 196 /* Get a local copy of the address. Handles possible alignment issues */
199 197
200 ACPI_MOVE_64_TO_64(&address, &reg->address); 198 ACPI_MOVE_64_TO_64(&address, &reg->address);
201 if (!address) { 199 if (!address) {
202 return (AE_OK); 200 return (AE_BAD_ADDRESS);
203 } 201 }
204 202
205 /* Supported widths are 8/16/32 */ 203 /* Supported widths are 8/16/32 */