aboutsummaryrefslogtreecommitdiff
path: root/hw/usb/dev-storage.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-03-12 17:26:50 +0100
committerGerd Hoffmann <kraxel@redhat.com>2015-03-17 14:23:53 +0100
commitc326529b74aa37adb216604bb6ca93cd49007012 (patch)
tree144ab2272611820fb9c535cacf1dc0e642ff81a5 /hw/usb/dev-storage.c
parent7afcc1f9bae3e857834a3bb8247be101e2354998 (diff)
usb/dev-storage: Avoid qerror_report_err() outside QMP handlers
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> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb/dev-storage.c')
-rw-r--r--hw/usb/dev-storage.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c
index f50bcb83e2..ae8d40dc77 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);
}
}