diff options
Diffstat (limited to 'hw/ppc/spapr_pci.c')
-rw-r--r-- | hw/ppc/spapr_pci.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 6126c80044..5049ced4e8 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -1798,7 +1798,7 @@ static const VMStateDescription vmstate_spapr_pci_msi = { }, }; -static void spapr_pci_pre_save(void *opaque) +static int spapr_pci_pre_save(void *opaque) { sPAPRPHBState *sphb = opaque; GHashTableIter iter; @@ -1823,7 +1823,7 @@ static void spapr_pci_pre_save(void *opaque) sphb->msi_devs = NULL; sphb->msi_devs_num = g_hash_table_size(sphb->msi); if (!sphb->msi_devs_num) { - return; + return 0; } sphb->msi_devs = g_malloc(sphb->msi_devs_num * sizeof(spapr_pci_msi_mig)); @@ -1832,6 +1832,8 @@ static void spapr_pci_pre_save(void *opaque) sphb->msi_devs[i].key = *(uint32_t *) key; sphb->msi_devs[i].value = *(spapr_pci_msi *) value; } + + return 0; } static int spapr_pci_post_load(void *opaque, int version_id) |