diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2018-02-09 16:38:33 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-02-12 10:41:09 +0100 |
commit | 4222f38ca3b7ae30ace582077677cec8b88fac36 (patch) | |
tree | 505249ffae6f4b77276b96a3f020aa9f64e3ffb1 /drivers/spi/spi-test.h | |
parent | Linux 4.16-rc1 (diff) | |
download | linux-4222f38ca3b7ae30ace582077677cec8b88fac36.tar.xz linux-4222f38ca3b7ae30ace582077677cec8b88fac36.zip |
ACPI / bus: Do not traverse through non-existed device table
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'.
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.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/spi/spi-test.h')
0 files changed, 0 insertions, 0 deletions