aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/events/evrgnini.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/events/evrgnini.c')
-rw-r--r--drivers/acpi/events/evrgnini.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/acpi/events/evrgnini.c b/drivers/acpi/events/evrgnini.c
index db98747fe54d..d1809f4240a4 100644
--- a/drivers/acpi/events/evrgnini.c
+++ b/drivers/acpi/events/evrgnini.c
@@ -75,7 +75,18 @@ acpi_ev_system_memory_region_setup(acpi_handle handle,
75 75
76 if (function == ACPI_REGION_DEACTIVATE) { 76 if (function == ACPI_REGION_DEACTIVATE) {
77 if (*region_context) { 77 if (*region_context) {
78 ACPI_FREE(*region_context); 78 local_region_context =
79 (struct acpi_mem_space_context *)*region_context;
80
81 /* Delete a cached mapping if present */
82
83 if (local_region_context->mapped_length) {
84 acpi_os_unmap_memory(local_region_context->
85 mapped_logical_address,
86 local_region_context->
87 mapped_length);
88 }
89 ACPI_FREE(local_region_context);
79 *region_context = NULL; 90 *region_context = NULL;
80 } 91 }
81 return_ACPI_STATUS(AE_OK); 92 return_ACPI_STATUS(AE_OK);