tpm_tis: check pnp_acpi_device return code
Reported-by: Peter Hüwe <peterhuewe@gmx.de> Reviewed-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Kent Yoder <key@linux.vnet.ibm.com>
This commit is contained in:
parent
7333549bf4
commit
6e38bfaad6
|
@ -84,6 +84,9 @@ static int is_itpm(struct pnp_dev *dev)
|
||||||
struct acpi_device *acpi = pnp_acpi_device(dev);
|
struct acpi_device *acpi = pnp_acpi_device(dev);
|
||||||
struct acpi_hardware_id *id;
|
struct acpi_hardware_id *id;
|
||||||
|
|
||||||
|
if (!acpi)
|
||||||
|
return 0;
|
||||||
|
|
||||||
list_for_each_entry(id, &acpi->pnp.ids, list) {
|
list_for_each_entry(id, &acpi->pnp.ids, list) {
|
||||||
if (!strcmp("INTC0102", id->id))
|
if (!strcmp("INTC0102", id->id))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in New Issue