aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Beschow <shentey@gmail.com>2025-03-18 21:57:07 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-03-31 16:25:59 +0200
commit02e521462405d9fd84b49787f6d8ae9b93d9b13c (patch)
tree1454904505b8e39bb5019acfd33e04ded7d19aac
parent8dcfb54090330c877ad5a05be5e555714eeb870c (diff)
downloadqemu-02e521462405d9fd84b49787f6d8ae9b93d9b13c.zip
qemu-02e521462405d9fd84b49787f6d8ae9b93d9b13c.tar.gz
qemu-02e521462405d9fd84b49787f6d8ae9b93d9b13c.tar.bz2
hw/arm/imx8mp-evk: Fix reference count of SoC object
TYPE_FSL_IMX8MP is created using object_new(), so must be realized with qdev_realize_and_unref() to keep the reference counting intact. Fixes: a4eefc69b237 "hw/arm: Add i.MX 8M Plus EVK board" Signed-off-by: Bernhard Beschow <shentey@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-ID: <20250318205709.28862-2-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
-rw-r--r--hw/arm/imx8mp-evk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/arm/imx8mp-evk.c b/hw/arm/imx8mp-evk.c
index e1a7892..e1a21e5 100644
--- a/hw/arm/imx8mp-evk.c
+++ b/hw/arm/imx8mp-evk.c
@@ -37,7 +37,7 @@ static void imx8mp_evk_init(MachineState *machine)
s = FSL_IMX8MP(object_new(TYPE_FSL_IMX8MP));
object_property_add_child(OBJECT(machine), "soc", OBJECT(s));
object_property_set_uint(OBJECT(s), "fec1-phy-num", 1, &error_fatal);
- qdev_realize(DEVICE(s), NULL, &error_fatal);
+ qdev_realize_and_unref(DEVICE(s), NULL, &error_fatal);
memory_region_add_subregion(get_system_memory(), FSL_IMX8MP_RAM_START,
machine->ram);