vl: remove unnecessary duplicate call to tpm_cleanup
PATCH 1/1 vl: remove unnecessary duplicate call to tpm_cleanup
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 <[email protected]>
--- vl.c | 3 --- 1 file changed, 3 deletions(-)
vl.c +0 -3
@@ -4631,9 +4631,6 @@ int main(int argc, char **argv, char **envp)bdrv_close_all ();pause_all_vcpus ();res_free (); -#ifdef CONFIG_TPM -tpm_cleanup (); -#endif return 0 ; }
Signature · 1 line
2.5.5
Michael Tokarev
AppliedQuoted 4 lines · Paolo Bonzini
tpm_cleanupis called frommain()and also registered with atexit fromtpm_init. The function only visits thetpm_backendslinked list, and the atexit registration happens right aftertpm_initfills in the list from -tpmdev options. Therefore, the direct call is unnecessary. Remove it.
Applied to -trivial. thanks!
/mjt