Skip to contentSkip to conversation

tmp_atmel: request correct region

PATCH New Dan Carpenter 1 participant 1 message Jul 29, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tmp_atmel: request correct region

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".

---
Found with a static checker. I don't have the hardware to test this.

drivers/char/tpm/tpm_atmel.c +1 -1
index c64a1bc..090b3ec 100644
@@ -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)) {