diff options
-rw-r--r-- | drivers/acpi/ec.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 3f7935ab0cf5..e9a04052084b 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -425,7 +425,7 @@ int acpi_ec_add_query_handler(struct acpi_ec *ec, u8 query_bit, | |||
425 | handler->func = func; | 425 | handler->func = func; |
426 | handler->data = data; | 426 | handler->data = data; |
427 | mutex_lock(&ec->lock); | 427 | mutex_lock(&ec->lock); |
428 | list_add_tail(&handler->node, &ec->list); | 428 | list_add(&handler->node, &ec->list); |
429 | mutex_unlock(&ec->lock); | 429 | mutex_unlock(&ec->lock); |
430 | return 0; | 430 | return 0; |
431 | } | 431 | } |
@@ -440,7 +440,6 @@ void acpi_ec_remove_query_handler(struct acpi_ec *ec, u8 query_bit) | |||
440 | if (query_bit == handler->query_bit) { | 440 | if (query_bit == handler->query_bit) { |
441 | list_del(&handler->node); | 441 | list_del(&handler->node); |
442 | kfree(handler); | 442 | kfree(handler); |
443 | break; | ||
444 | } | 443 | } |
445 | } | 444 | } |
446 | mutex_unlock(&ec->lock); | 445 | mutex_unlock(&ec->lock); |