The initialize routine is: * class -> bus -> platform The exit routine is: * platform -> class -> bus Fix the exit routine to be: * platform -> bus -> class Signed-off-by: Mario Limonciello <mario.limonciello@xxxxxxxx> --- drivers/platform/x86/wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index 0765b1797d4c..077a9b7459ef 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c @@ -1264,8 +1264,8 @@ static int __init acpi_wmi_init(void) static void __exit acpi_wmi_exit(void) { platform_driver_unregister(&acpi_wmi_driver); - class_unregister(&wmi_bus_class); bus_unregister(&wmi_bus_type); + class_unregister(&wmi_bus_class); } subsys_initcall(acpi_wmi_init); -- 2.14.1