aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm/tpm_nsc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/tpm/tpm_nsc.c')
-rw-r--r--drivers/char/tpm/tpm_nsc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/char/tpm/tpm_nsc.c b/drivers/char/tpm/tpm_nsc.c
index 26287aace87d..608f73071bef 100644
--- a/drivers/char/tpm/tpm_nsc.c
+++ b/drivers/char/tpm/tpm_nsc.c
@@ -284,7 +284,7 @@ static struct device_driver nsc_drv = {
284static int __init init_nsc(void) 284static int __init init_nsc(void)
285{ 285{
286 int rc = 0; 286 int rc = 0;
287 int lo, hi; 287 int lo, hi, err;
288 int nscAddrBase = TPM_ADDR; 288 int nscAddrBase = TPM_ADDR;
289 struct tpm_chip *chip; 289 struct tpm_chip *chip;
290 unsigned long base; 290 unsigned long base;
@@ -297,7 +297,9 @@ static int __init init_nsc(void)
297 return -ENODEV; 297 return -ENODEV;
298 } 298 }
299 299
300 driver_register(&nsc_drv); 300 err = driver_register(&nsc_drv);
301 if (err)
302 return err;
301 303
302 hi = tpm_read_index(nscAddrBase, TPM_NSC_BASE0_HI); 304 hi = tpm_read_index(nscAddrBase, TPM_NSC_BASE0_HI);
303 lo = tpm_read_index(nscAddrBase, TPM_NSC_BASE0_LO); 305 lo = tpm_read_index(nscAddrBase, TPM_NSC_BASE0_LO);