mirror-linux/drivers/acpi
Rafael J. Wysocki e4865a56d0 ACPI: driver: Check ACPI_COMPANION() against NULL during probe
Since every platform driver can be forced to match a device that doesn't
match its list of device IDs because of device_match_driver_override(),
platform drivers that rely on the existence of a device's ACPI companion
object should verify its presence.

Accordingly, add requisite ACPI_COMPANION() or ACPI_HANDLE() checks
against NULL to 13 platform drivers handling core ACPI devices.

Also change the value returned by the ACPI thermal zone driver when
the device's ACPI companion is not present to -ENODEV for consistency
with the other drivers.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/4516068.ejJDZkT8p0@rafael.j.wysocki
Cc: 7.0+ <stable@vger.kernel.org> # 7.0+
2026-05-11 18:50:06 +02:00
..
acpica ACPICA: Replace strncpy() with strscpy_pad() in acpi_ut_safe_strncpy() 2026-03-23 18:32:34 +01:00
apei ACPI: APEI: EINJ: Fix EINJV2 memory error injection 2026-04-27 21:42:31 +02:00
arm64 ACPI: arm64: cpuidle: Tolerate platforms with no deep PSCI idle states 2026-04-27 13:39:32 +01:00
dptf Thermal control updates for 6.19-rc1 2025-12-02 17:49:12 -08:00
nfit ACPI: driver: Check ACPI_COMPANION() against NULL during probe 2026-05-11 18:50:06 +02:00
numa ACPI: NUMA: Only parse CFMWS at boot when CXL_ACPI is on 2026-03-16 10:11:25 -07:00
pmic ACPI: PMIC: Remove unneeded check in tps68470_pmic_opregion_probe() 2024-08-02 17:05:08 +02:00
riscv RISC-V: ACPI: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval 2026-04-06 16:55:15 +02:00
x86 ACPI: TAD/x86: cmos_rtc: Consolidate address space handler setup 2026-02-26 18:50:10 +01:00
Kconfig ACPI: tables: Enable FPDT on LoongArch 2026-04-06 16:43:05 +02:00
Makefile ACPI: MRRM: Minimal parse of ACPI MRRM table 2025-05-12 15:43:16 +02:00
ac.c ACPI: driver: Check ACPI_COMPANION() against NULL during probe 2026-05-11 18:50:06 +02:00
acpi_adxl.c
acpi_apd.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
acpi_configfs.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
acpi_dbg.c ACPI: debug: fix signedness issues in read/write helpers 2025-09-23 15:45:28 +02:00
acpi_extlog.c ACPI: extlog: Trace CPER CXL Protocol Error Section 2026-01-14 17:09:34 +01:00
acpi_ffh.c
acpi_fpdt.c ACPI: FPDT: expose FBPT and S3PT subtables via sysfs 2026-03-26 15:59:52 +01:00
acpi_ipmi.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
acpi_lpat.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
acpi_lpit.c x86/msr: Rename 'rdmsrl_safe()' to 'rdmsrq_safe()' 2025-04-10 11:58:38 +02:00
acpi_memhotplug.c ACPI: driver: Do not set acpi_device_class() unnecessarily 2026-03-13 16:48:26 +01:00
acpi_mrrm.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
acpi_pad.c ACPI: driver: Check ACPI_COMPANION() against NULL during probe 2026-05-11 18:50:06 +02:00
acpi_pcc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
acpi_platform.c ACPI: video: Switch over to auxiliary bus type 2026-03-10 15:08:21 +01:00
acpi_pnp.c ACPI: PNP: Drop CMOS RTC PNP device support 2026-02-26 18:48:07 +01:00
acpi_processor.c Merge branch 'acpi-driver' 2026-04-09 21:54:15 +02:00
acpi_tad.c ACPI: driver: Check ACPI_COMPANION() against NULL during probe 2026-05-11 18:50:06 +02:00
acpi_video.c ACPI: driver: Do not set acpi_device_class() unnecessarily 2026-03-13 16:48:26 +01:00
acpi_watchdog.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
battery.c ACPI: driver: Check ACPI_COMPANION() against NULL during probe 2026-05-11 18:50:06 +02:00
bgrt.c sysfs: treewide: switch back to attribute_group::bin_attrs 2025-06-17 10:44:15 +02:00
bus.c ACPI: bus: Fix MFD child automatic modprobe issue 2026-03-18 11:57:22 +01:00
button.c ACPI: driver: Check ACPI_COMPANION() against NULL during probe 2026-05-11 18:50:06 +02:00
container.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
cppc_acpi.c ACPI: CPPC: Fix related_cpus inconsistency during CPU hotplug 2026-04-27 21:50:26 +02:00
debugfs.c
device_pm.c Revert "ACPI: PM: Let acpi_dev_pm_attach() skip devices without ACPI PM" 2026-03-03 15:32:53 +01:00
device_sysfs.c ACPI: sysfs: Replace sprintf() with sysfs_emit() 2026-01-27 21:58:58 +01:00
dock.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ec.c ACPI: driver: Check ACPI_COMPANION() against NULL during probe 2026-05-11 18:50:06 +02:00
ec_sys.c
event.c ACPI: event: Redefine acpi_notifier_call_chain() 2026-03-13 16:48:24 +01:00
evged.c ACPI: Switch back to struct platform_driver::remove() 2024-11-12 21:30:30 +01:00
fan.h Thermal control updates for 6.19-rc1 2025-12-02 17:49:12 -08:00
fan_attr.c ACPI: fan: Use ACPI handle when retrieving _FST 2025-10-24 10:29:08 +02:00
fan_core.c ACPI: fan: Add support for Microsoft fan extensions 2025-10-27 20:56:01 +01:00
fan_hwmon.c ACPI: fan: Add hwmon notification support 2025-10-27 20:56:01 +01:00
glue.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hed.c ACPI: driver: Check ACPI_COMPANION() against NULL during probe 2026-05-11 18:50:06 +02:00
internal.h ACPI: DPTF: Remove int340x thermal scan handler 2025-11-07 20:45:37 +01:00
ioapic.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq.c ACPI: irq: Add interrupt affinity reporting interface 2025-10-27 17:16:32 +01:00
mipi-disco-img.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
nhlt.c ACPI: NHLT: Streamline struct naming 2024-03-27 16:36:45 +01:00
nvs.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
osi.c ACPI: OSI: Add DMI quirk for Acer Aspire One D255 2026-02-24 15:43:51 +01:00
osl.c Locking updates for v7.1: 2026-04-14 12:36:25 -07:00
pci_irq.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pci_link.c ACPI: driver: Do not set acpi_device_class() unnecessarily 2026-03-13 16:48:26 +01:00
pci_mcfg.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pci_root.c ACPI: driver: Do not set acpi_device_class() unnecessarily 2026-03-13 16:48:26 +01:00
pci_slot.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pfr_telemetry.c ACPI: driver: Check ACPI_COMPANION() against NULL during probe 2026-05-11 18:50:06 +02:00
pfr_update.c ACPI: driver: Check ACPI_COMPANION() against NULL during probe 2026-05-11 18:50:06 +02:00
platform_profile.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
power.c ACPI: scan: Use acpi_dev_put() in object add error paths 2026-04-15 16:43:58 +02:00
pptt.c Merge branches 'acpica', 'acpi-osl' and 'acpi-tables' 2026-04-09 21:19:34 +02:00
prmt.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
proc.c ACPI: proc: Prefer to use octal permission 2025-06-26 21:08:13 +02:00
processor_core.c ACPI: processor_core: fix map_x2apic_id for amd-pstate on am4 2025-11-26 18:06:25 +01:00
processor_driver.c ACPI: driver: Do not set acpi_device_class() unnecessarily 2026-03-13 16:48:26 +01:00
processor_idle.c ACPI: processor: idle: Reset cpuidle on C-state list changes 2026-04-07 15:32:20 +02:00
processor_pdc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
processor_perflib.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
processor_thermal.c ACPI: processor: thermal: Release policy references using __free() 2025-09-08 19:53:32 +02:00
processor_throttling.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
property.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
reboot.c
resource.c ACPI: resource: Add JWIPC JVC9100 to irq1_level_low_skip_override[] 2026-01-14 17:25:19 +01:00
sbs.c ACPI: driver: Check ACPI_COMPANION() against NULL during probe 2026-05-11 18:50:06 +02:00
sbshc.c ACPI: driver: Check ACPI_COMPANION() against NULL during probe 2026-05-11 18:50:06 +02:00
sbshc.h
scan.c ACPI: scan: Use acpi_dev_put() in object add error paths 2026-04-15 16:43:58 +02:00
sleep.c ACPI: PM: Save NVS memory on Lenovo G70-35 2026-02-19 11:54:52 +01:00
sleep.h ACPI: PM: s2idle: Staticise LPS0 callback functions 2025-10-20 20:39:33 +02:00
spcr.c ACPI: SPCR: Check for table version when using precise baudrate 2025-10-27 20:43:41 +01:00
sysfs.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
tables.c ACPI / MPAM: Parse the MPAM table 2025-11-19 18:34:20 +00:00
thermal.c ACPI: driver: Check ACPI_COMPANION() against NULL during probe 2026-05-11 18:50:06 +02:00
thermal_lib.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
tiny-power-button.c ACPI: driver: Check ACPI_COMPANION() against NULL during probe 2026-05-11 18:50:06 +02:00
utils.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
video_detect.c ACPI: video: force native backlight on HP OMEN 16 (8A44) 2026-04-27 22:00:00 +02:00
viot.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
wakeup.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00