qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC PATCH v3 20/24] hw/ssi: allow NULL realize callbacks for peripheral


From: Octavian Purdila
Subject: [RFC PATCH v3 20/24] hw/ssi: allow NULL realize callbacks for peripherals
Date: Mon, 26 Aug 2024 23:45:24 -0700

Signed-off-by: tavip <[email protected]>
---
 hw/ssi/ssi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hw/ssi/ssi.c b/hw/ssi/ssi.c
index 3f357e8f16..d1f3ce7c22 100644
--- a/hw/ssi/ssi.c
+++ b/hw/ssi/ssi.c
@@ -105,7 +105,9 @@ static void ssi_peripheral_realize(DeviceState *dev, Error 
**errp)
     }
     s->spc = ssc;
 
-    ssc->realize(s, errp);
+    if (ssc->realize) {
+        ssc->realize(s, errp);
+    }
 }
 
 static Property ssi_peripheral_properties[] = {
-- 
2.46.0.295.g3b9ea8a38a-goog




reply via email to

[Prev in Thread] Current Thread [Next in Thread]