[PATCH 4/8]drivers:tmp.c Fix warning: variable 'rc' set but not used
From: Justin P. Mattock
Date: Mon Jun 14 2010 - 16:28:19 EST
Im getting this warning when compiling:
CC drivers/char/tpm/tpm.o
drivers/char/tpm/tpm.c: In function 'tpm_gen_interrupt':
drivers/char/tpm/tpm.c:508:10: warning: variable 'rc' set but not used
The below patch gets rid of the warning,
but I'm not sure if it's the best solution.
Signed-off-by: Justin P. Mattock <justinmattock@xxxxxxxxx>
---
drivers/char/tpm/tpm.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c
index 05ad4a1..3d685dc 100644
--- a/drivers/char/tpm/tpm.c
+++ b/drivers/char/tpm/tpm.c
@@ -514,6 +514,8 @@ void tpm_gen_interrupt(struct tpm_chip *chip)
rc = transmit_cmd(chip, &tpm_cmd, TPM_INTERNAL_RESULT_SIZE,
"attempting to determine the timeouts");
+ if (!rc)
+ rc = 0;
}
EXPORT_SYMBOL_GPL(tpm_gen_interrupt);
--
1.7.1.rc1.21.gf3bd6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/