diff options
Diffstat (limited to 'drivers/acpi/ec.c')
-rw-r--r-- | drivers/acpi/ec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index bf60b24ebf54..06b78e5e33a1 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -445,9 +445,9 @@ EXPORT_SYMBOL_GPL(acpi_ec_add_query_handler); | |||
445 | 445 | ||
446 | void acpi_ec_remove_query_handler(struct acpi_ec *ec, u8 query_bit) | 446 | void acpi_ec_remove_query_handler(struct acpi_ec *ec, u8 query_bit) |
447 | { | 447 | { |
448 | struct acpi_ec_query_handler *handler; | 448 | struct acpi_ec_query_handler *handler, *tmp; |
449 | mutex_lock(&ec->lock); | 449 | mutex_lock(&ec->lock); |
450 | list_for_each_entry(handler, &ec->list, node) { | 450 | list_for_each_entry_safe(handler, tmp, &ec->list, node) { |
451 | if (query_bit == handler->query_bit) { | 451 | if (query_bit == handler->query_bit) { |
452 | list_del(&handler->node); | 452 | list_del(&handler->node); |
453 | kfree(handler); | 453 | kfree(handler); |