qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] tpm: Prevent a call to TPM if no TPM support is requested
@ 2015-06-02 18:05 Stefan Berger
  2015-06-03  7:07 ` Juan Quintela
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Berger @ 2015-06-02 18:05 UTC (permalink / raw)
  To: qemu-devel, mst; +Cc: peter.maydell, Stefan Berger, stefanb, quintela

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

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

end of thread, other threads:[~2015-06-03  7:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-02 18:05 [Qemu-devel] [PATCH] tpm: Prevent a call to TPM if no TPM support is requested Stefan Berger
2015-06-03  7:07 ` Juan Quintela

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).