diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-02-23 15:03:05 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-02-23 15:03:05 -0800 |
commit | 628af43984feeecfe086ae885ab407bd0e7c329e (patch) | |
tree | 0490c8a46d8f489ddd4cb28239141ded8cd7a0b3 /drivers/acpi/acpica/evhandler.c | |
parent | 005d3bd9e332faa976320cfaa2ae0637c8e94c51 (diff) | |
parent | 833a18d0715d97db8fa5e8d7eb614fc143ac78e4 (diff) | |
download | lwn-628af43984feeecfe086ae885ab407bd0e7c329e.tar.gz lwn-628af43984feeecfe086ae885ab407bd0e7c329e.zip |
Merge tag 'acpi-5.12-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull more ACPI updates from Rafael Wysocki:
"Fix race condition in generic_serial_bus (I2C) and GPIO Operation
Region handling in ACPICA and reduce some related code duplication
(Hans de Goede)"
* tag 'acpi-5.12-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
ACPICA: Remove some code duplication from acpi_ev_address_space_dispatch
ACPICA: Fix race in generic_serial_bus (I2C) and GPIO op_region parameter handling
Diffstat (limited to 'drivers/acpi/acpica/evhandler.c')
-rw-r--r-- | drivers/acpi/acpica/evhandler.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/evhandler.c b/drivers/acpi/acpica/evhandler.c index ea9485e6a475..c0cd7147a5a3 100644 --- a/drivers/acpi/acpica/evhandler.c +++ b/drivers/acpi/acpica/evhandler.c @@ -489,6 +489,13 @@ acpi_ev_install_space_handler(struct acpi_namespace_node *node, /* Init handler obj */ + status = + acpi_os_create_mutex(&handler_obj->address_space.context_mutex); + if (ACPI_FAILURE(status)) { + acpi_ut_remove_reference(handler_obj); + goto unlock_and_exit; + } + handler_obj->address_space.space_id = (u8)space_id; handler_obj->address_space.handler_flags = flags; handler_obj->address_space.region_list = NULL; |