tpmdd-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [patch] tpm: uninitialized variable in read_log_of()
@ 2016-11-16 14:12 Dan Carpenter
  2016-11-16 15:36 ` Jarkko Sakkinen
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2016-11-16 14:12 UTC (permalink / raw)
  To: Peter Huewe, Nayna Jain
  Cc: Marcel Selhorst, Jarkko Sakkinen, Jason Gunthorpe, tpmdd-devel,
	kernel-janitors

"np" is supposed to be set to NULL at the start.

Fixes: 4a45d9669ac1 ("tpm: replace of_find_node_by_name() with dev of_node propert")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/char/tpm/tpm_of.c b/drivers/char/tpm/tpm_of.c
index 3af829f..904ed4a 100644
--- a/drivers/char/tpm/tpm_of.c
+++ b/drivers/char/tpm/tpm_of.c
@@ -23,7 +23,7 @@
 
 int read_log_of(struct tpm_chip *chip)
 {
-	struct device_node *np;
+	struct device_node *np = NULL;
 	const u32 *sizep;
 	const u64 *basep;
 	struct tpm_bios_log *log;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-16 15:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-16 14:12 [patch] tpm: uninitialized variable in read_log_of() Dan Carpenter
2016-11-16 15:36 ` Jarkko Sakkinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).