diff mbox

[PULL,05/16] vl: remove unnecessary duplicate call to tpm_cleanup

Message ID bc82585a8fd5d38e7c2402999a7ccc9a97d762c9.1473782118.git.mjt@msgid.tls.msk.ru
State New
Headers show

Commit Message

Michael Tokarev Sept. 13, 2016, 4:04 p.m. UTC
From: Paolo Bonzini <pbonzini@redhat.com>

tpm_cleanup is called from main() and also registered with atexit from
tpm_init.  The function only visits the tpm_backends linked list, and the
atexit registration happens right after tpm_init fills in the list from
-tpmdev options.  Therefore, the direct call is unnecessary.  Remove it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 vl.c | 3 ---
 1 file changed, 3 deletions(-)
diff mbox

Patch

diff --git a/vl.c b/vl.c
index ee557a1..82cf85b 100644
--- a/vl.c
+++ b/vl.c
@@ -4620,9 +4620,6 @@  int main(int argc, char **argv, char **envp)
     bdrv_close_all();
     pause_all_vcpus();
     res_free();
-#ifdef CONFIG_TPM
-    tpm_cleanup();
-#endif
 
     /* vhost-user must be cleaned up before chardevs.  */
     net_cleanup();