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:
Alexey Khoroshilov 2017-07-22 00:48:06 +03:00 committed by Darren Hart (VMware)
parent a00c69632a
commit 972777171f
1 changed files with 3 additions and 3 deletions

View File

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