diff options
Diffstat (limited to 'hw/usb/bus.c')
-rw-r--r-- | hw/usb/bus.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/usb/bus.c b/hw/usb/bus.c index ee6b43abc6..26ab67fc2a 100644 --- a/hw/usb/bus.c +++ b/hw/usb/bus.c @@ -725,9 +725,8 @@ USBDevice *usbdevice_create(const char *cmdline) } object_property_set_bool(OBJECT(dev), true, "realized", &err); if (err) { - error_report("Failed to initialize USB device '%s': %s", - f->name, error_get_pretty(err)); - error_free(err); + error_reportf_err(err, "Failed to initialize USB device '%s': ", + f->name); object_unparent(OBJECT(dev)); return NULL; } |