1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/platform/x86/dell
Hans de Goede 3a53587423 platform/x86: dell-smbios-wmi: Fix oops on rmmod dell_smbios
init_dell_smbios_wmi() only registers the dell_smbios_wmi_driver on systems
where the Dell WMI interface is supported. While exit_dell_smbios_wmi()
unregisters it unconditionally, this leads to the following oops:

[  175.722921] ------------[ cut here ]------------
[  175.722925] Unexpected driver unregister!
[  175.722939] WARNING: CPU: 1 PID: 3630 at drivers/base/driver.c:194 driver_unregister+0x38/0x40
...
[  175.723089] Call Trace:
[  175.723094]  cleanup_module+0x5/0xedd [dell_smbios]
...
[  175.723148] ---[ end trace 064c34e1ad49509d ]---

Make the unregister happen on the same condition the register happens
to fix this.

Cc: Mario Limonciello <mario.limonciello@outlook.com>
Fixes: 1a258e6704 ("platform/x86: dell-smbios-wmi: Add new WMI dispatcher driver")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Mario Limonciello <mario.limonciello@outlook.com>
Reviewed-by: Mark Gross <mgross@linux.intel.com>
Link: https://lore.kernel.org/r/20210518125027.21824-1-hdegoede@redhat.com
2021-05-19 15:59:47 +02:00
..
dell-wmi-sysman platform/x86: Adjust Dell drivers to a personal email address 2021-04-07 19:47:23 +02:00
alienware-wmi.c platform/x86: Adjust Dell drivers to a personal email address 2021-04-07 19:47:23 +02:00
dcdbas.c platform/x86: Move all dell drivers to their own subdirectory 2021-02-04 13:23:55 +01:00
dcdbas.h platform/x86: Move all dell drivers to their own subdirectory 2021-02-04 13:23:55 +01:00
dell-laptop.c platform/x86: Move all dell drivers to their own subdirectory 2021-02-04 13:23:55 +01:00
dell-rbtn.c platform/x86: Move all dell drivers to their own subdirectory 2021-02-04 13:23:55 +01:00
dell-rbtn.h platform/x86: Move all dell drivers to their own subdirectory 2021-02-04 13:23:55 +01:00
dell-smbios-base.c platform/x86: Adjust Dell drivers to a personal email address 2021-04-07 19:47:23 +02:00
dell-smbios-smm.c platform/x86: Move all dell drivers to their own subdirectory 2021-02-04 13:23:55 +01:00
dell-smbios-wmi.c platform/x86: dell-smbios-wmi: Fix oops on rmmod dell_smbios 2021-05-19 15:59:47 +02:00
dell-smbios.h platform/x86: Move all dell drivers to their own subdirectory 2021-02-04 13:23:55 +01:00
dell-smo8800.c platform/x86: Move all dell drivers to their own subdirectory 2021-02-04 13:23:55 +01:00
dell-wmi-aio.c platform/x86: Move all dell drivers to their own subdirectory 2021-02-04 13:23:55 +01:00
dell-wmi-descriptor.c platform/x86: Adjust Dell drivers to a personal email address 2021-04-07 19:47:23 +02:00
dell-wmi-descriptor.h platform/x86: Move all dell drivers to their own subdirectory 2021-02-04 13:23:55 +01:00
dell-wmi-led.c platform/x86: Move all dell drivers to their own subdirectory 2021-02-04 13:23:55 +01:00
dell-wmi.c platform/x86: wmi: Make remove callback return void 2021-03-08 11:33:39 +01:00
dell_rbu.c treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
Kconfig platform/x86: Move all dell drivers to their own subdirectory 2021-02-04 13:23:55 +01:00
Makefile platform/x86: Move all dell drivers to their own subdirectory 2021-02-04 13:23:55 +01:00