]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ACPI: x86: Add adev NULL check to acpi_quirk_skip_serdev_enumeration()
authorHans de Goede <hdegoede@redhat.com>
Sat, 9 Nov 2024 22:00:28 +0000 (23:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 19:03:37 +0000 (20:03 +0100)
commite173bce05f7032a8b4964cfef82a4b7668f5f3af
tree3a3cf525f2751079384a56e6ea35a0f94878b64d
parent342d91f67051f29b634ff2c93ca10f431367b968
ACPI: x86: Add adev NULL check to acpi_quirk_skip_serdev_enumeration()

[ Upstream commit 4a49194f587a62d972b602e3e1a2c3cfe6567966 ]

acpi_dev_hid_match() does not check for adev == NULL, dereferencing
it unconditional.

Add a check for adev being NULL before calling acpi_dev_hid_match().

At the moment acpi_quirk_skip_serdev_enumeration() is never called with
a controller_parent without an ACPI companion, but better safe than sorry.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://patch.msgid.link/20241109220028.83047-1-hdegoede@redhat.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/acpi/x86/utils.c