summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/huawei-wmi.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2019-10-10 13:30:53 +0300
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2019-10-15 10:55:10 +0300
commit8c7d9ec8a470c39254dd0f64293545dcc86189d5 (patch)
tree1e6a0b3774983fdc98b7d89d7b048acbaa313ada /drivers/platform/x86/huawei-wmi.c
parent9bfc14cb6a6a2d05bd746dccef5c41096b4f392c (diff)
downloadlinux-8c7d9ec8a470c39254dd0f64293545dcc86189d5.tar.xz
platform/x86: huawei-wmi: Don't leak memory on the exit
We have to clean memory resources allocated during init. Fixes: 7532afb35012 ("platform/x86: huawei-wmi: Move to platform driver") Cc: Ayman Bagabas <ayman.bagabas@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/platform/x86/huawei-wmi.c')
-rw-r--r--drivers/platform/x86/huawei-wmi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/platform/x86/huawei-wmi.c b/drivers/platform/x86/huawei-wmi.c
index 3050444d5330..7ae9848cc6f3 100644
--- a/drivers/platform/x86/huawei-wmi.c
+++ b/drivers/platform/x86/huawei-wmi.c
@@ -885,6 +885,8 @@ static __exit void huawei_wmi_exit(void)
{
platform_device_unregister(huawei_wmi->pdev);
platform_driver_unregister(&huawei_wmi_driver);
+
+ kfree(huawei_wmi);
}
module_init(huawei_wmi_init);