From: Stefan Berger <stefanb@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org, mst@redhat.com
Cc: peter.maydell@linaro.org,
Stefan Berger <stefanb@linux.vnet.ibm.com>,
stefanb@us.ibm.com, quintela@redhat.com
Subject: [Qemu-devel] [PATCH] tpm: Prevent a call to TPM if no TPM support is requested
Date: Tue, 2 Jun 2015 14:05:22 -0400 [thread overview]
Message-ID: <1433268322-1290277-1-git-send-email-stefanb@linux.vnet.ibm.com> (raw)
Prevent the function tpm_tis_get_tpm_version() from being called
if not TPM support is requested.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
---
include/sysemu/tpm.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/sysemu/tpm.h b/include/sysemu/tpm.h
index c143890..c8afa17 100644
--- a/include/sysemu/tpm.h
+++ b/include/sysemu/tpm.h
@@ -32,11 +32,13 @@ TPMVersion tpm_tis_get_tpm_version(Object *obj);
static inline TPMVersion tpm_get_version(void)
{
+#ifdef CONFIG_TPM
Object *obj = object_resolve_path_type("", TYPE_TPM_TIS, NULL);
if (obj) {
return tpm_tis_get_tpm_version(obj);
}
+#endif
return TPM_VERSION_UNSPEC;
}
--
1.9.3
next reply other threads:[~2015-06-02 18:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-02 18:05 Stefan Berger [this message]
2015-06-03 7:07 ` [Qemu-devel] [PATCH] tpm: Prevent a call to TPM if no TPM support is requested Juan Quintela
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=1433268322-1290277-1-git-send-email-stefanb@linux.vnet.ibm.com \
--to=stefanb@linux.vnet.ibm.com \
--cc=mst@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=stefanb@us.ibm.com \
/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).