spapr/kvm: Fix error handling in kvmppc_xive_pre_save()
Now that kvmppc_xive_get_queues() returns a negative errno on failure, check with that because it is preferred to local_err. And most of all, propagate it because vmstate expects negative errnos. Signed-off-by: Greg Kurz <groug@kaod.org> Message-Id: <159707849455.1489912.6034461176847728064.stgit@bahia.lan> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
d55daadcb8
commit
42a92d925d
@ -604,16 +604,17 @@ void kvmppc_xive_synchronize_state(SpaprXive *xive, Error **errp)
|
||||
int kvmppc_xive_pre_save(SpaprXive *xive)
|
||||
{
|
||||
Error *local_err = NULL;
|
||||
int ret;
|
||||
|
||||
assert(xive->fd != -1);
|
||||
|
||||
/* EAT: there is no extra state to query from KVM */
|
||||
|
||||
/* ENDT */
|
||||
kvmppc_xive_get_queues(xive, &local_err);
|
||||
if (local_err) {
|
||||
ret = kvmppc_xive_get_queues(xive, &local_err);
|
||||
if (ret < 0) {
|
||||
error_report_err(local_err);
|
||||
return -1;
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user