diff options
| author | Markus Armbruster <armbru@redhat.com> | 2015-02-04 13:28:12 +0100 |
|---|---|---|
| committer | Gerd Hoffmann <kraxel@redhat.com> | 2015-02-18 10:53:10 +0100 |
| commit | 599655c91f3a55ac75007e851deca09010787bd7 (patch) | |
| tree | 26a75433cab3bea852aad00f73ec9b6b23cdb458 /hw/usb/bus.c | |
| parent | bd8b92d5c8387c2c94f06665514c05000169fafd (diff) | |
| download | focaccia-qemu-599655c91f3a55ac75007e851deca09010787bd7.tar.gz focaccia-qemu-599655c91f3a55ac75007e851deca09010787bd7.zip | |
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 <armbru@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb/bus.c')
| -rw-r--r-- | hw/usb/bus.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/hw/usb/bus.c b/hw/usb/bus.c index 5abfac0532..d83a93887f 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, |