mirror of
https://github.com/qemu/qemu.git
synced 2024-11-29 23:03:41 +08:00
fw_cfg: fw_cfg is a singleton
Make sure we only have a single instance ever: because if it isn't we can't find it so it's useless anyway. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
600c60b76d
commit
cac122103a
@ -496,10 +496,9 @@ FWCfgState *fw_cfg_init(uint32_t ctl_port, uint32_t data_port,
|
||||
|
||||
s = DO_UPCAST(FWCfgState, busdev.qdev, dev);
|
||||
|
||||
if (!object_resolve_path(FW_CFG_PATH, NULL)) {
|
||||
object_property_add_child(qdev_get_machine(), FW_CFG_NAME, OBJECT(s),
|
||||
NULL);
|
||||
}
|
||||
assert(!object_resolve_path(FW_CFG_PATH, NULL));
|
||||
|
||||
object_property_add_child(qdev_get_machine(), FW_CFG_NAME, OBJECT(s), NULL);
|
||||
|
||||
qdev_init_nofail(dev);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user