|
@@ -347,18 +347,19 @@ static int cpu_post_load(void *opaque, int version_id)
|
|
if (cpu->compat_pvr) {
|
|
if (cpu->compat_pvr) {
|
|
uint32_t compat_pvr = cpu->compat_pvr;
|
|
uint32_t compat_pvr = cpu->compat_pvr;
|
|
Error *local_err = NULL;
|
|
Error *local_err = NULL;
|
|
|
|
+ int ret;
|
|
|
|
|
|
cpu->compat_pvr = 0;
|
|
cpu->compat_pvr = 0;
|
|
- ppc_set_compat(cpu, compat_pvr, &local_err);
|
|
|
|
- if (local_err) {
|
|
|
|
|
|
+ ret = ppc_set_compat(cpu, compat_pvr, &local_err);
|
|
|
|
+ if (ret < 0) {
|
|
error_report_err(local_err);
|
|
error_report_err(local_err);
|
|
- return -1;
|
|
|
|
|
|
+ return ret;
|
|
}
|
|
}
|
|
} else
|
|
} else
|
|
#endif
|
|
#endif
|
|
{
|
|
{
|
|
if (!pvr_match(cpu, env->spr[SPR_PVR])) {
|
|
if (!pvr_match(cpu, env->spr[SPR_PVR])) {
|
|
- return -1;
|
|
|
|
|
|
+ return -EINVAL;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|