mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-16 14:41:55 -06:00
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>
This commit is contained in:
parent
bd8b92d5c8
commit
599655c91f
1 changed files with 1 additions and 8 deletions
|
@ -339,14 +339,7 @@ static USBDevice *usb_try_create_simple(USBBus *bus, const char *name,
|
||||||
|
|
||||||
USBDevice *usb_create_simple(USBBus *bus, const char *name)
|
USBDevice *usb_create_simple(USBBus *bus, const char *name)
|
||||||
{
|
{
|
||||||
Error *err = NULL;
|
return usb_try_create_simple(bus, name, &error_abort);
|
||||||
USBDevice *dev = usb_try_create_simple(bus, name, &err);
|
|
||||||
|
|
||||||
if (!dev) {
|
|
||||||
error_report("%s", error_get_pretty(err));
|
|
||||||
error_free(err);
|
|
||||||
}
|
|
||||||
return dev;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void usb_fill_port(USBPort *port, void *opaque, int index,
|
static void usb_fill_port(USBPort *port, void *opaque, int index,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue