Revert "usb: release the created buses"

The USB device don't hold the bus. There is no ASAN related reports
anymore.

This reverts commit cd7bc87868.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20180613172815.32738-3-marcandre.lureau@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Marc-André Lureau 2018-06-13 19:28:14 +02:00 committed by Gerd Hoffmann
parent a1738cd8c5
commit 9b5c2fd53f
2 changed files with 0 additions and 18 deletions

View File

@ -588,13 +588,6 @@ static const struct SCSIBusInfo usb_msd_scsi_info_bot = {
.load_request = usb_msd_load_request, .load_request = usb_msd_load_request,
}; };
static void usb_msd_unrealize_storage(USBDevice *dev, Error **errp)
{
MSDState *s = USB_STORAGE_DEV(dev);
object_unref(OBJECT(&s->bus));
}
static void usb_msd_storage_realize(USBDevice *dev, Error **errp) static void usb_msd_storage_realize(USBDevice *dev, Error **errp)
{ {
MSDState *s = USB_STORAGE_DEV(dev); MSDState *s = USB_STORAGE_DEV(dev);
@ -642,13 +635,6 @@ static void usb_msd_storage_realize(USBDevice *dev, Error **errp)
s->scsi_dev = scsi_dev; s->scsi_dev = scsi_dev;
} }
static void usb_msd_bot_unrealize(USBDevice *dev, Error **errp)
{
MSDState *s = USB_STORAGE_DEV(dev);
object_unref(OBJECT(&s->bus));
}
static void usb_msd_bot_realize(USBDevice *dev, Error **errp) static void usb_msd_bot_realize(USBDevice *dev, Error **errp)
{ {
MSDState *s = USB_STORAGE_DEV(dev); MSDState *s = USB_STORAGE_DEV(dev);
@ -712,7 +698,6 @@ static void usb_msd_class_storage_initfn(ObjectClass *klass, void *data)
USBDeviceClass *uc = USB_DEVICE_CLASS(klass); USBDeviceClass *uc = USB_DEVICE_CLASS(klass);
uc->realize = usb_msd_storage_realize; uc->realize = usb_msd_storage_realize;
uc->unrealize = usb_msd_unrealize_storage;
dc->props = msd_properties; dc->props = msd_properties;
} }
@ -775,7 +760,6 @@ static void usb_msd_class_bot_initfn(ObjectClass *klass, void *data)
USBDeviceClass *uc = USB_DEVICE_CLASS(klass); USBDeviceClass *uc = USB_DEVICE_CLASS(klass);
uc->realize = usb_msd_bot_realize; uc->realize = usb_msd_bot_realize;
uc->unrealize = usb_msd_bot_unrealize;
uc->attached_settable = true; uc->attached_settable = true;
} }

View File

@ -896,8 +896,6 @@ static void usb_uas_unrealize(USBDevice *dev, Error **errp)
UASDevice *uas = USB_UAS(dev); UASDevice *uas = USB_UAS(dev);
qemu_bh_delete(uas->status_bh); qemu_bh_delete(uas->status_bh);
object_unref(OBJECT(&uas->bus));
} }
static void usb_uas_realize(USBDevice *dev, Error **errp) static void usb_uas_realize(USBDevice *dev, Error **errp)