]> Git Repo - qemu.git/blobdiff - tpm.c
acpi: Simplify printing to dynamic string
[qemu.git] / tpm.c
diff --git a/tpm.c b/tpm.c
index d68d69fe3910a139ebf9789c8d507b719bcfc2c3..963b7ee0d82e2de1ed196b6005194d46fe023d14 100644 (file)
--- a/tpm.c
+++ b/tpm.c
@@ -134,7 +134,7 @@ static int configure_tpm(QemuOpts *opts)
     Error *local_err = NULL;
 
     if (!QLIST_EMPTY(&tpm_backends)) {
-        error_report("Only one TPM is allowed.\n");
+        error_report("Only one TPM is allowed.");
         return 1;
     }
 
@@ -161,9 +161,8 @@ static int configure_tpm(QemuOpts *opts)
 
     /* validate backend specific opts */
     qemu_opts_validate(opts, be->opts, &local_err);
-    if (error_is_set(&local_err)) {
-        qerror_report_err(local_err);
-        error_free(local_err);
+    if (local_err) {
+        error_report_err(local_err);
         return 1;
     }
 
@@ -174,8 +173,7 @@ static int configure_tpm(QemuOpts *opts)
 
     tpm_backend_open(drv, &local_err);
     if (local_err) {
-        qerror_report_err(local_err);
-        error_free(local_err);
+        error_report_err(local_err);
         return 1;
     }
 
This page took 0.022923 seconds and 4 git commands to generate.