summary refs log tree commit diff stats
path: root/hw/usb
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-12-16 18:23:26 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-01-13 17:07:00 +0100
commit8bf6275f7e08ed8fea309ecda29c5da8837ed952 (patch)
treefabedd2c12a50b00177fa7dfd76ad660aab77bae /hw/usb
parent901b78a0eeda7d8d955e9ffe6608801df14b5638 (diff)
downloadfocaccia-qemu-8bf6275f7e08ed8fea309ecda29c5da8837ed952.tar.gz
focaccia-qemu-8bf6275f7e08ed8fea309ecda29c5da8837ed952.zip
hw/usb: Inline usb_try_new()
Inline the single use of usb_try_new().

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Message-Id: <20240216110313.17039-10-philmd@linaro.org>
Diffstat (limited to 'hw/usb')
-rw-r--r--hw/usb/bus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/usb/bus.c b/hw/usb/bus.c
index b19b0b13eb..7e7deaadca 100644
--- a/hw/usb/bus.c
+++ b/hw/usb/bus.c
@@ -411,7 +411,7 @@ void usb_claim_port(USBDevice *dev, Error **errp)
     } else {
         if (bus->nfree == 1 && strcmp(object_get_typename(OBJECT(dev)), "usb-hub") != 0) {
             /* Create a new hub and chain it on */
-            hub = usb_try_new("usb-hub");
+            hub = USB_DEVICE(qdev_try_new("usb-hub"));
             if (hub) {
                 usb_realize_and_unref(hub, bus, NULL);
             }