Skip to content

Commit

Permalink
tpm_tis: check pnp_acpi_device return code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kent Yoder committed Feb 5, 2013
1 parent 7333549 commit 6e38bfa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/char/tpm/tpm_tis.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ static int is_itpm(struct pnp_dev *dev)
struct acpi_device *acpi = pnp_acpi_device(dev);
struct acpi_hardware_id *id;

if (!acpi)
return 0;

list_for_each_entry(id, &acpi->pnp.ids, list) {
if (!strcmp("INTC0102", id->id))
return 1;
Expand Down

0 comments on commit 6e38bfa

Please sign in to comment.