summaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm
diff options
context:
space:
mode:
authorKent Yoder <key@linux.vnet.ibm.com>2013-01-31 16:39:31 +0100
committerKent Yoder <key@linux.vnet.ibm.com>2013-02-05 16:38:26 +0100
commit6e38bfaad6c83bdd07eb659f9bfd50f8d71a5a46 (patch)
tree7cdfb2a18dee73e3fcc503fbba6e8fd012ee8e8f /drivers/char/tpm
parentchar/tpm/tpm_i2c_stm_st33: drop temporary variable for return value (diff)
downloadlinux-6e38bfaad6c83bdd07eb659f9bfd50f8d71a5a46.tar.xz
linux-6e38bfaad6c83bdd07eb659f9bfd50f8d71a5a46.zip
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>
Diffstat (limited to 'drivers/char/tpm')
-rw-r--r--drivers/char/tpm/tpm_tis.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
index 6c69ad72f82f..8a41b6be23a0 100644
--- a/drivers/char/tpm/tpm_tis.c
+++ b/drivers/char/tpm/tpm_tis.c
@@ -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;