mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-30 12:19:05 -04:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user