summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/executer/exoparg3.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/executer/exoparg3.c')
-rw-r--r--drivers/acpi/executer/exoparg3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/executer/exoparg3.c b/drivers/acpi/executer/exoparg3.c
index 483365777670..2ea1c322970b 100644
--- a/drivers/acpi/executer/exoparg3.c
+++ b/drivers/acpi/executer/exoparg3.c
@@ -223,8 +223,8 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state)
goto cleanup;
}
- if (length > 0) {
- /* Copy the portion requested */
+ if (buffer) {
+ /* We have a buffer, copy the portion requested */
ACPI_MEMCPY(buffer, operand[0]->string.pointer + index,
length);