From 6e38bfaad6c83bdd07eb659f9bfd50f8d71a5a46 Mon Sep 17 00:00:00 2001 From: Kent Yoder Date: Thu, 31 Jan 2013 09:39:31 -0600 Subject: [PATCH] tpm_tis: check pnp_acpi_device return code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported-by: Peter Hüwe Reviewed-by: Peter Huewe Signed-off-by: Kent Yoder --- drivers/char/tpm/tpm_tis.c | 3 +++ 1 file changed, 3 insertions(+) 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;