summaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorAlexey Khoroshilov <khoroshilov@ispras.ru>2017-07-21 23:48:06 +0200
committerDarren Hart (VMware) <dvhart@infradead.org>2017-07-22 01:21:03 +0200
commit972777171f33f9932f51feebe42dbcc1b475d01a (patch)
treef7a8e1388bbfb9ee13f8e86c712917acb669e35b /drivers/platform
parentplatform/x86: peaq-wmi: select INPUT_POLLDEV (diff)
downloadlinux-972777171f33f9932f51feebe42dbcc1b475d01a.tar.xz
linux-972777171f33f9932f51feebe42dbcc1b475d01a.zip
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>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/wmi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index 1a764e311e11..e32ba575e8d9 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -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;
}