Add the missing destroy_workqueue() before return from acpi_ec_init() in the error handling case. Signed-off-by: Wei Yongjun <weiyj.lk@xxxxxxxxx> --- drivers/acpi/ec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 9267554..853a55d 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -1676,8 +1676,10 @@ int __init acpi_ec_init(void) /* Now register the driver for the EC */ result = acpi_bus_register_driver(&acpi_ec_driver); - if (result < 0) + if (result < 0) { + destroy_workqueue(ec_query_wq); return -ENODEV; + } return result; } -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html