static int usb_qdev_init(DeviceState *qdev, DeviceInfo *base)

{

    USBDevice *dev = DO_UPCAST(USBDevice, qdev, qdev);

    USBDeviceInfo *info = DO_UPCAST(USBDeviceInfo, qdev, base);

    int rc;



    pstrcpy(dev->product_desc, sizeof(dev->product_desc), info->product_desc);

    dev->info = info;

    dev->auto_attach = 1;

    QLIST_INIT(&dev->strings);

    rc = usb_claim_port(dev);

    if (rc != 0) {

        goto err;

    }

    rc = dev->info->init(dev);

    if (rc != 0) {

        goto err;

    }

    if (dev->auto_attach) {

        rc = usb_device_attach(dev);

        if (rc != 0) {

            goto err;

        }

    }

    return 0;



err:

    usb_qdev_exit(qdev);

    return rc;

}

static int usb_qdev_init(DeviceState *qdev, DeviceInfo *base)

{

    USBDevice *dev = DO_UPCAST(USBDevice, qdev, qdev);

    USBDeviceInfo *info = DO_UPCAST(USBDeviceInfo, qdev, base);

    int rc;



    pstrcpy(dev->product_desc, sizeof(dev->product_desc), info->product_desc);

    dev->info = info;

    dev->auto_attach = 1;

    QLIST_INIT(&dev->strings);

    rc = usb_claim_port(dev);

    if (rc != 0) {

        goto err;

    }

    rc = dev->info->init(dev);

    if (rc != 0) {

        goto err;

    }

    if (dev->auto_attach) {

        rc = usb_device_attach(dev);

        if (rc != 0) {

            goto err;

        }

    }

    return 0;



err:

    usb_qdev_exit(qdev);

    return rc;

}

        goto err;         goto err;             goto err; err:     usb_qdev_exit(qdev);     return rc;
static int FUNC_0(DeviceState *VAR_0, DeviceInfo *VAR_1)

{

    USBDevice *dev = DO_UPCAST(USBDevice, VAR_0, VAR_0);

    USBDeviceInfo *info = DO_UPCAST(USBDeviceInfo, VAR_0, VAR_1);

    int VAR_2;



    pstrcpy(dev->product_desc, sizeof(dev->product_desc), info->product_desc);

    dev->info = info;

    dev->auto_attach = 1;

    QLIST_INIT(&dev->strings);

    VAR_2 = usb_claim_port(dev);

    if (VAR_2 != 0) {

        goto err;

    }

    VAR_2 = dev->info->init(dev);

    if (VAR_2 != 0) {

        goto err;

    }

    if (dev->auto_attach) {

        VAR_2 = usb_device_attach(dev);

        if (VAR_2 != 0) {

            goto err;

        }

    }

    return 0;



err:

    usb_qdev_exit(VAR_0);

    return VAR_2;

}

static int FUNC_0(DeviceState *VAR_0, DeviceInfo *VAR_1)
{ USBDevice *dev = DO_UPCAST(USBDevice, VAR_0, VAR_0); USBDeviceInfo *info = DO_UPCAST(USBDeviceInfo, VAR_0, VAR_1); int VAR_2; pstrcpy(dev->product_desc, sizeof(dev->product_desc), info->product_desc); dev->info = info; dev->auto_attach = 1; QLIST_INIT(&dev->strings); VAR_2 = usb_claim_port(dev); if (VAR_2 != 0) { goto err; } VAR_2 = dev->info->init(dev); if (VAR_2 != 0) { goto err; } if (dev->auto_attach) { VAR_2 = usb_device_attach(dev); if (VAR_2 != 0) { goto err; } } return 0; err:
usb_qdev_exit(VAR_0); return VAR_2; }