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>

authored by Alexey Khoroshilov and committed by Darren Hart (VMware) 97277717 a00c6963

Changed files
+3 -3
drivers
platform
x86
+3 -3
drivers/platform/x86/wmi.c
··· 1252 1252 1253 1253 return 0; 1254 1254 1255 - err_unreg_class: 1256 - class_unregister(&wmi_bus_class); 1257 - 1258 1255 err_unreg_bus: 1259 1256 bus_unregister(&wmi_bus_type); 1257 + 1258 + err_unreg_class: 1259 + class_unregister(&wmi_bus_class); 1260 1260 1261 1261 return error; 1262 1262 }