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>
This commit is contained in:
Andy Shevchenko 2019-10-10 13:30:53 +03:00
parent 9bfc14cb6a
commit 8c7d9ec8a4

View File

@ -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);