From: Markus Armbruster Date: Wed, 4 Feb 2015 12:28:12 +0000 (+0100) Subject: usb: Change usb_create_simple() to abort on failure X-Git-Tag: v2.3.0-rc0~55^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=599655c91f3a55ac75007e851deca09010787bd7;p=thirdparty%2Fqemu.git usb: Change usb_create_simple() to abort on failure Instead of returning null pointer. Matches pci_create_simple(), isa_create_simple(), sysbus_create_simple(). It's unused since the previous commit, but I'll put it to use again shortly. Signed-off-by: Markus Armbruster Signed-off-by: Gerd Hoffmann --- diff --git a/hw/usb/bus.c b/hw/usb/bus.c index 5abfac05320..d83a93887fc 100644 --- a/hw/usb/bus.c +++ b/hw/usb/bus.c @@ -339,14 +339,7 @@ static USBDevice *usb_try_create_simple(USBBus *bus, const char *name, USBDevice *usb_create_simple(USBBus *bus, const char *name) { - Error *err = NULL; - USBDevice *dev = usb_try_create_simple(bus, name, &err); - - if (!dev) { - error_report("%s", error_get_pretty(err)); - error_free(err); - } - return dev; + return usb_try_create_simple(bus, name, &error_abort); } static void usb_fill_port(USBPort *port, void *opaque, int index,