]> Git Repo - qemu.git/commitdiff
tpm: Avoid qerror_report_err() outside QMP command handlers
authorMarkus Armbruster <[email protected]>
Tue, 10 Feb 2015 14:11:17 +0000 (15:11 +0100)
committerMarkus Armbruster <[email protected]>
Wed, 18 Feb 2015 09:51:37 +0000 (10:51 +0100)
qerror_report_err() is a transitional interface to help with
converting existing monitor commands to QMP.  It should not be used
elsewhere.  Replace by error_report_err() in initial startup helper
configure_tpm().

Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
tpm.c

diff --git a/tpm.c b/tpm.c
index c371023b1c1baa68d9417f0ac88074f159e70419..4ffd9b927e2de8cf85587e3873e219331e051ea6 100644 (file)
--- a/tpm.c
+++ b/tpm.c
@@ -162,8 +162,7 @@ static int configure_tpm(QemuOpts *opts)
     /* validate backend specific opts */
     qemu_opts_validate(opts, be->opts, &local_err);
     if (local_err) {
-        qerror_report_err(local_err);
-        error_free(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.026057 seconds and 4 git commands to generate.