Commit 97277717 authored by Alexey Khoroshilov's avatar Alexey Khoroshilov Committed by Darren Hart (VMware)

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: default avatarAlexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: default avatarDarren Hart (VMware) <dvhart@infradead.org>
parent a00c6963
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment