summaryrefslogtreecommitdiff
path: root/hw/usb/dev-bluetooth.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-02-04 13:28:08 +0100
committerGerd Hoffmann <kraxel@redhat.com>2015-02-18 10:53:09 +0100
commit4806ec9b2c57ff42a91d5419ac1137fffd1c9fb5 (patch)
tree002f53fb1679440abd8ae19990ca04fd729d9493 /hw/usb/dev-bluetooth.c
parentcd2d5541271f1934345d8ca42f5fafff1744eee7 (diff)
downloadqemu-4806ec9b2c57ff42a91d5419ac1137fffd1c9fb5.tar.gz
qemu-4806ec9b2c57ff42a91d5419ac1137fffd1c9fb5.tar.bz2
qemu-4806ec9b2c57ff42a91d5419ac1137fffd1c9fb5.zip
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>
Diffstat (limited to 'hw/usb/dev-bluetooth.c')
-rw-r--r--hw/usb/dev-bluetooth.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/hw/usb/dev-bluetooth.c b/hw/usb/dev-bluetooth.c
index 390d475c16..8b3b31694b 100644
--- a/hw/usb/dev-bluetooth.c
+++ b/hw/usb/dev-bluetooth.c
@@ -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) {