Skip to contentSkip to conversation

ACPI / bus: Do not traverse through non-existed device table

PATCH Superseded Andy Shevchenko 1 participant 1 message Feb 5, 2018

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 2/6 ACPI / bus: Do not traverse through non-existed device table

Quoted 19 lines · Rafael J. Wysocki
Quoted 17 lines · Andy Shevchenko
Quoted 16 lines · Andy Shevchenko
Quoted 6 lines · Sinan Kaya
Quoted 3 lines · Andy Shevchenko

When __acpi_match_device() is called it would be possible to have
ACPI ID table a MULL pointer. To avoid potential dereference,

NULL

Thanks, will fix later.

Quoted 1 line

Why not bail out here immediately if ids is null?

Because of the code which wasn't in context of this patch.

See also patch 1 in the series.

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

It's about how acpi_driver_match_device() uses it.

Btw, it makes device_get_match_data() to work properly on PRP0001 kind
of devices.

Maybe combine this one with the [1/6] then, it would make it somewhat easier to follow what's going on.

Sure, I will fold in.