diff options
Diffstat (limited to 'hw/usb-bus.c')
-rw-r--r-- | hw/usb-bus.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/usb-bus.c b/hw/usb-bus.c index 28b517f5da..87dcc7f175 100644 --- a/hw/usb-bus.c +++ b/hw/usb-bus.c @@ -45,8 +45,9 @@ static int usb_qdev_init(DeviceState *qdev, DeviceInfo *base) pstrcpy(dev->devname, sizeof(dev->devname), qdev->info->name); dev->info = info; + dev->auto_attach = 1; rc = dev->info->init(dev); - if (rc == 0) + if (rc == 0 && dev->auto_attach) usb_device_attach(dev); return rc; } |