ACPI / bus: Do not traverse through non-existed device table
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]>Signed-off-by Andy Shevchenko <[email protected]>
For the whole series,
Reviewed-by Mika Westerberg <[email protected]>
---
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