ACPI / EC: Fix a memory leakage issue in acpi_ec_add()
authorLv Zheng <lv.zheng@intel.com>
Wed, 7 Sep 2016 08:50:14 +0000 (16:50 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 10 Sep 2016 00:33:49 +0000 (02:33 +0200)
commit46922d2a3aff5122253d97e64500801c08f4f2c0
tree4417cc9c60cd932e592a9940a6c0cbb7dca4eac9
parent72c77b7ea9ce781f4987840984a462e4456ba98e
ACPI / EC: Fix a memory leakage issue in acpi_ec_add()

When the handler installation failed, there was no code to free the
allocated EC device. This patch fixes this memory leakage issue.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=115021
Reported-and-tested-by: Luya Tshimbalanga <luya@fedoraproject.org>
Tested-by: Jonh Henderson <jw.hendy@gmail.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/ec.c