aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/nvram/fw_cfg.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c
index df3f089fd4..3c255cec01 100644
--- a/hw/nvram/fw_cfg.c
+++ b/hw/nvram/fw_cfg.c
@@ -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);