usb: Eliminate usb_try_create_simple()
commit535770518f85e6e8b912c262492a251053491637
authorMarkus Armbruster <armbru@redhat.com>
Wed, 10 Jun 2020 05:32:18 +0000 (10 07:32 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 15 Jun 2020 20:05:28 +0000 (15 22:05 +0200)
tree2dd70505ef97c9d94383ac886ac05f769b69ce46
parent8cd81a9e551265dc63fe80aa83af773709e48552
usb: Eliminate usb_try_create_simple()

usb_try_create_simple() is qdev_try_new() and qdev_realize_and_unref()
with more verbose error messages.  Of its two users, one ignores
errors, and the other asserts they are impossible.

Make them use qdev_try_new() and qdev_realize_and_unref() directly,
and eliminate usb_try_create_simple

Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200610053247.1583243-30-armbru@redhat.com>
hw/usb/bus.c