mirror of
https://github.com/torvalds/linux.git
synced 2024-12-19 01:23:20 +00:00
platform/x86: wmi: Fix error handling in acpi_wmi_init()
The order of resource deallocations is messed up in acpi_wmi_init(). It should be vice versa. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
This commit is contained in:
parent
a00c69632a
commit
972777171f
@ -1252,12 +1252,12 @@ static int __init acpi_wmi_init(void)
|
||||
|
||||
return 0;
|
||||
|
||||
err_unreg_class:
|
||||
class_unregister(&wmi_bus_class);
|
||||
|
||||
err_unreg_bus:
|
||||
bus_unregister(&wmi_bus_type);
|
||||
|
||||
err_unreg_class:
|
||||
class_unregister(&wmi_bus_class);
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user