From: Dan Carpenter <dan.carpenter@oracle.com>
To: Peter Huewe <peterhuewe@gmx.de>, Nayna Jain <nayna@linux.vnet.ibm.com>
Cc: Marcel Selhorst <tpmdd@selhorst.net>,
Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
tpmdd-devel@lists.sourceforge.net,
kernel-janitors@vger.kernel.org
Subject: [patch] tpm: uninitialized variable in read_log_of()
Date: Wed, 16 Nov 2016 17:12:21 +0300 [thread overview]
Message-ID: <20161116141221.GA28875@mwanda> (raw)
"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;
next reply other threads:[~2016-11-16 14:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-16 14:12 Dan Carpenter [this message]
2016-11-16 15:36 ` [patch] tpm: uninitialized variable in read_log_of() Jarkko Sakkinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161116141221.GA28875@mwanda \
--to=dan.carpenter@oracle.com \
--cc=jarkko.sakkinen@linux.intel.com \
--cc=jgunthorpe@obsidianresearch.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=nayna@linux.vnet.ibm.com \
--cc=peterhuewe@gmx.de \
--cc=tpmdd-devel@lists.sourceforge.net \
--cc=tpmdd@selhorst.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).