void qdev_unplug(DeviceState *dev, Error **errp)

{

    DeviceClass *dc = DEVICE_GET_CLASS(dev);



    if (!dev->parent_bus->allow_hotplug) {

        error_set(errp, QERR_BUS_NO_HOTPLUG, dev->parent_bus->name);

        return;

    }

    assert(dc->unplug != NULL);



    qdev_hot_removed = true;



    if (dc->unplug(dev) < 0) {

        error_set(errp, QERR_UNDEFINED_ERROR);

        return;

    }

}

void qdev_unplug(DeviceState *dev, Error **errp)

{

    DeviceClass *dc = DEVICE_GET_CLASS(dev);



    if (!dev->parent_bus->allow_hotplug) {

        error_set(errp, QERR_BUS_NO_HOTPLUG, dev->parent_bus->name);

        return;

    }

    assert(dc->unplug != NULL);



    qdev_hot_removed = true;



    if (dc->unplug(dev) < 0) {

        error_set(errp, QERR_UNDEFINED_ERROR);

        return;

    }

}

void FUNC_0(DeviceState *VAR_0, Error **VAR_1)

{

    DeviceClass *dc = DEVICE_GET_CLASS(VAR_0);



    if (!VAR_0->parent_bus->allow_hotplug) {

        error_set(VAR_1, QERR_BUS_NO_HOTPLUG, VAR_0->parent_bus->name);

        return;

    }

    assert(dc->unplug != NULL);



    qdev_hot_removed = true;



    if (dc->unplug(VAR_0) < 0) {

        error_set(VAR_1, QERR_UNDEFINED_ERROR);

        return;

    }

}

void FUNC_0(DeviceState *VAR_0, Error **VAR_1)
{ DeviceClass *dc = DEVICE_GET_CLASS(VAR_0); if (!VAR_0->parent_bus->allow_hotplug) { error_set(VAR_1, QERR_BUS_NO_HOTPLUG, VAR_0->parent_bus->name); return; } assert(dc->unplug != NULL); qdev_hot_removed = true; if (dc->unplug(VAR_0) < 0) { error_set(VAR_1, QERR_UNDEFINED_ERROR); return; } }