ACPI: glue: Skip devices with no type in acpi_device_notify()

Since all of the users of struct acpi_bus_type use the device type
for matching, devices without a type will not be matched by any of
them, so they can be skipped early in acpi_device_notify().

Update the code accordingly.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/2078562.PYKUYFuaPT@rafael.j.wysocki
This commit is contained in:
Rafael J. Wysocki 2026-09-10 19:56:22 +02:00
parent 6935468526
commit ea9102cae4

View File

@ -63,6 +63,9 @@ static struct acpi_device *acpi_companion_lookup(struct device *dev)
{
struct acpi_bus_type *type;
if (!dev->type)
return NULL;
guard(rwsem_read)(&bus_type_sem);
list_for_each_entry(type, &bus_type_list, list) {