mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
usb: usb_create() can't fail, drop useless error handling
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
cd2d554127
commit
4806ec9b2c
5 changed files with 1 additions and 18 deletions
|
@ -530,14 +530,10 @@ static USBDevice *usb_bt_init(USBBus *bus, const char *cmdline)
|
|||
} else {
|
||||
hci = bt_new_hci(qemu_find_bt_vlan(0));
|
||||
}
|
||||
|
||||
if (!hci)
|
||||
return NULL;
|
||||
|
||||
dev = usb_create(bus, name);
|
||||
if (!dev) {
|
||||
error_report("Failed to create USB device '%s'", name);
|
||||
return NULL;
|
||||
}
|
||||
s = DO_UPCAST(struct USBBtState, dev, dev);
|
||||
s->hci = hci;
|
||||
if (qdev_init(&dev->qdev) < 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue