From: Dan Carpenter on
We wanted to request "base". "tpm_atmel.base" is zero here. This bug
was introduced by e0dd03caf20d "[PATCH] tpm: return chip from
tpm_register_hardware".

Signed-off-by: Dan Carpenter <error27(a)gmail.com>
---
Found with a static checker. I don't have the hardware to test this.

diff --git a/drivers/char/tpm/tpm_atmel.c b/drivers/char/tpm/tpm_atmel.c
index c64a1bc..090b3ec 100644
--- a/drivers/char/tpm/tpm_atmel.c
+++ b/drivers/char/tpm/tpm_atmel.c
@@ -205,7 +205,7 @@ static int __init init_atmel(void)

have_region =
(atmel_request_region
- (tpm_atmel.base, region_size, "tpm_atmel0") == NULL) ? 0 : 1;
+ (base, region_size, "tpm_atmel0") == NULL) ? 0 : 1;

pdev = platform_device_register_simple("tpm_atmel", -1, NULL, 0);
if (IS_ERR(pdev)) {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/