diff options
author | Cédric Le Goater <clg@kaod.org> | 2019-01-04 14:30:50 +0100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2019-01-09 09:28:14 +1100 |
commit | e502202c9b6334343fe0004b7965d92e85ea1891 (patch) | |
tree | 950b5e673e9545c2392de10453713fb678a6a2dd /hw/ppc | |
parent | 3ff73aa24125f18b3d1b24423213cc7d63a11f90 (diff) |
spapr: return from post_load method when RTC import fails
The error value can be squashed by the section handling radix migration.
Simply bail out if an error occurs when the RTC offset is imported.
This fixes the Coverity issue CID 1398591.
Fixes: d39c90f5f3ae ("spapr: Fix migration of Radix guests")
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc')
-rw-r--r-- | hw/ppc/spapr.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 8576c1c6f7..59faeccf4b 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1747,12 +1747,17 @@ static int spapr_post_load(void *opaque, int version_id) return err; } - /* In earlier versions, there was no separate qdev for the PAPR + /* + * In earlier versions, there was no separate qdev for the PAPR * RTC, so the RTC offset was stored directly in sPAPREnvironment. * So when migrating from those versions, poke the incoming offset - * value into the RTC device */ + * value into the RTC device + */ if (version_id < 3) { err = spapr_rtc_import_offset(&spapr->rtc, spapr->rtc_offset); + if (err) { + return err; + } } if (kvm_enabled() && spapr->patb_entry) { |