Hello Cedric,

+    for (i = 0; i < ASPEED_FSI_NUM; i++) {
+        if (!qdev_realize_and_unref(DEVICE(&s->fsi[i]), BUS(&s->opb[i]),


s->fsi[i] is not allocated. We should use qdev_realize instead.

I am not sure I understood this. FSIMasterState fsi[ASPEED_FSI_NUM]; is inside structure AspeedAPB2OPBState so it must be allocated, right?

See the documentation :

https://www.qemu.org/docs/master/devel/qdev-api.html#c.qdev_realize_and_unref

Fixed it. Thanks for the review.

Regards,

Ninad


Reply via email to