diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-10-01 22:30:35 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-10-01 22:30:35 +0200 |
commit | 01351eb23c5047895c14c91a898546c289a3c35c (patch) | |
tree | 9da0b8500659bcc304d762fccbd414884f864a29 | |
parent | dd953d318daad9a3c1f9a6bf31430bf40163051e (diff) | |
parent | 15b94fa32a422f4b97dc34e4b7060ec83d10bee5 (diff) |
Merge branch 'acpi-ec'
* acpi-ec:
ACPI / EC: Fix a memory leak issue in acpi_ec_query()
-rw-r--r-- | drivers/acpi/ec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 2614a839c60d..42c66b64c12c 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -1044,8 +1044,10 @@ static int acpi_ec_query(struct acpi_ec *ec, u8 *data) goto err_exit; mutex_lock(&ec->mutex); + result = -ENODATA; list_for_each_entry(handler, &ec->list, node) { if (value == handler->query_bit) { + result = 0; q->handler = acpi_ec_get_query_handler(handler); ec_dbg_evt("Query(0x%02x) scheduled", q->handler->query_bit); |