linux-stable/drivers/platform
Armin Wolf ed85891a27
platform/x86: wmi: Fix probe failure when failing to register WMI devices
When a WMI device besides the first one somehow fails to register,
retval is returned while still containing a negative error code. This
causes the ACPI device fail to probe, leaving behind zombie WMI devices
leading to various errors later.

Handle the single error path separately and return 0 unconditionally
after trying to register all WMI devices to solve the issue. Also
continue to register WMI devices even if some fail to allocate memory.

Fixes: 6ee50aaa9a ("platform/x86: wmi: Instantiate all devices before adding them")
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20231020211005.38216-4-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2023-10-25 12:46:38 +03:00
..
chrome USB / Thunderbolt / PHY driver update for 6.6-rc1 2023-09-01 09:23:34 -07:00
goldfish platform: goldfish: pipe: Use platform_get_irq() to get the interrupt 2022-03-18 13:55:21 +01:00
loongarch platform/loongarch: laptop: Fix possible UAF and simplify generic_acpi_laptop_init() 2022-10-29 16:29:31 +08:00
mellanox platform/mellanox: nvsw-sn2201: Convert to platform remove callback returning void 2023-09-28 13:26:31 +03:00
mips platform/mips: Adjust Kconfig to keep consistency 2022-12-08 11:51:52 +01:00
olpc platform/olpc: olpc-xo175-ec: Use SPI device ID data to bind device 2023-03-20 14:43:35 +01:00
surface platform/surface: hotplug: Convert to platform remove callback returning void 2023-09-21 18:31:19 +02:00
x86 platform/x86: wmi: Fix probe failure when failing to register WMI devices 2023-10-25 12:46:38 +03:00
Kconfig platform/mips: Adjust Kconfig to keep consistency 2022-12-08 11:51:52 +01:00
Makefile LoongArch: Add ACPI-based generic laptop driver 2022-10-12 16:36:20 +08:00