qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: kraxel@redhat.com, lcapitulino@redhat.com
Subject: [Qemu-devel] [PATCH 5/5] usb/dev-storage: Avoid qerror_report_err() outside QMP handlers
Date: Thu, 12 Mar 2015 17:26:50 +0100	[thread overview]
Message-ID: <1426177610-4848-6-git-send-email-armbru@redhat.com> (raw)
In-Reply-To: <1426177610-4848-1-git-send-email-armbru@redhat.com>

qerror_report_err() is a transitional interface to help with
converting existing monitor commands to QMP.  It should not be used
elsewhere.

usb_msd_password_cb() is only called from within an HMP command
handler.  Replace by error_report_err().

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 hw/usb/dev-storage.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c
index f50bcb8..ae8d40d 100644
--- a/hw/usb/dev-storage.c
+++ b/hw/usb/dev-storage.c
@@ -559,8 +559,7 @@ static void usb_msd_password_cb(void *opaque, int err)
     }
 
     if (local_err) {
-        qerror_report_err(local_err);
-        error_free(local_err);
+        error_report_err(local_err);
         qdev_unplug(&s->dev.qdev, NULL);
     }
 }
-- 
1.9.3

  parent reply	other threads:[~2015-03-12 16:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-12 16:26 [Qemu-devel] [PATCH 0/5] monitor usb: Fixes for encrypted images Markus Armbruster
2015-03-12 16:26 ` [Qemu-devel] [PATCH 1/5] monitor: Drop dead QMP check from monitor_read_password() Markus Armbruster
2015-03-12 16:26 ` [Qemu-devel] [PATCH 2/5] monitor: Plug memory leak in monitor_read_bdrv_key_start() Markus Armbruster
2015-03-12 16:26 ` [Qemu-devel] [PATCH 3/5] monitor usb: Inline monitor_read_bdrv_key_start()'s first part Markus Armbruster
2015-03-12 16:26 ` [Qemu-devel] [PATCH 4/5] usb/dev-storage: Fix QMP device_add missing encryption key failure Markus Armbruster
2015-03-12 16:26 ` Markus Armbruster [this message]
2015-03-12 18:06 ` [Qemu-devel] [PATCH 0/5] monitor usb: Fixes for encrypted images Eric Blake
2015-03-17 12:09 ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1426177610-4848-6-git-send-email-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).