From: Paolo Bonzini Date: Thu, 16 Jun 2016 12:25:04 +0000 (+0200) Subject: vl: remove unnecessary duplicate call to tpm_cleanup X-Git-Tag: v2.8.0-rc0~143^2~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bc82585a8fd5d38e7c2402999a7ccc9a97d762c9;p=thirdparty%2Fqemu.git 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 Signed-off-by: Michael Tokarev --- diff --git a/vl.c b/vl.c index ee557a1d3f8..82cf85b1b45 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();