From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48600) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDWMD-0001dS-6p for qemu-devel@nongnu.org; Thu, 16 Jun 2016 08:25:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDWM8-0000hN-5O for qemu-devel@nongnu.org; Thu, 16 Jun 2016 08:25:12 -0400 From: Paolo Bonzini Date: Thu, 16 Jun 2016 14:25:04 +0200 Message-Id: <1466079904-28902-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH] vl: remove unnecessary duplicate call to tpm_cleanup List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, stefanb@us.ibm.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 --- vl.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/vl.c b/vl.c index a7cb3b3..e05ded4 100644 --- a/vl.c +++ b/vl.c @@ -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; } -- 2.5.5