diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2019-10-10 13:30:53 +0300 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2019-10-15 10:55:10 +0300 |
commit | 8c7d9ec8a470c39254dd0f64293545dcc86189d5 (patch) | |
tree | 1e6a0b3774983fdc98b7d89d7b048acbaa313ada /drivers/platform/x86/huawei-wmi.c | |
parent | 9bfc14cb6a6a2d05bd746dccef5c41096b4f392c (diff) | |
download | linux-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.c | 2 |
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); |