]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
platform/x86: dell/dell-rbtn: Check ACPI_COMPANION() against NULL
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 12 May 2026 14:05:07 +0000 (16:05 +0200)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Wed, 20 May 2026 10:05:06 +0000 (13:05 +0300)
commit8a17c62b02fc4baa02300b57a2ad882c7a06a984
tree1b8fa2c003c4a5357b84f648343d7f0c2352fddc
parent08f29dc34d1cf39696d04bc1ff31538dc2d74c72
platform/x86: dell/dell-rbtn: Check ACPI_COMPANION() against NULL

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(), so
platform drivers that rely on the existence of a device's ACPI companion
object need to verify its presence.

Accordingly, add a requisite ACPI_COMPANION() check against NULL to the
platform/x86 dell-rbtn driver.

Fixes: 19ebacfb442b ("platform/x86: dell/dell-rbtn: Convert ACPI driver to a platform one")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/2276487.irdbgypaU6@rafael.j.wysocki
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/dell/dell-rbtn.c