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>
This commit is contained in:
Markus Armbruster 2015-03-12 17:26:50 +01:00 committed by Gerd Hoffmann
parent 7afcc1f9ba
commit c326529b74

View File

@ -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);
}
}