mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
usb: Proper error propagation for usb_device_attach errors
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
ee210d6390
commit
fa19bf831b
3 changed files with 21 additions and 15 deletions
|
@ -1178,10 +1178,14 @@ static int usb_host_open(USBHostDevice *dev, int bus_num,
|
|||
prod_name);
|
||||
}
|
||||
|
||||
ret = usb_device_attach(&dev->dev);
|
||||
if (ret) {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* USB devio uses 'write' flag to check for async completions */
|
||||
qemu_set_fd_handler(dev->fd, NULL, async_complete, dev);
|
||||
|
||||
usb_device_attach(&dev->dev);
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue