Skip to contentSkip to conversation

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

PATCH New Mika Westerberg 1 participant 1 message Feb 12, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v4 1/4 ACPI / bus: Do not traverse through non-existed device table

Quoted 6 lines · Andy Shevchenko

When __acpi_match_device() is called it would be possible to have ACPI ID table a NULL pointer. To avoid potential dereference, check for this before traverse.

While here, remove redundant 'else'.

Quoted 8 lines

Note, this patch implies a bit of refactoring acpi_of_match_device() to return pointer to OF ID when matched followed by refactoring __acpi_match_device() to return either ACPI or OF ID when matches.

Cc Sinan Kaya <[email protected]>
Cc Sakari Ailus <[email protected]>
Cc Vinod Koul <[email protected]>

For the whole series,

---
To unsubscribe from this list: send the line "unsubscribe dmaengine" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html