qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 09/14] spapr/kvm: Fix error handling in kvmppc_xive_pre_save(


From: David Gibson
Subject: Re: [PATCH 09/14] spapr/kvm: Fix error handling in kvmppc_xive_pre_save()
Date: Thu, 13 Aug 2020 20:28:42 +1000

On Mon, Aug 10, 2020 at 06:54:54PM +0200, Greg Kurz wrote:
> 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>

Fixed a conflict and applied to ppc-for-5.2.

> ---
>  hw/intc/spapr_xive_kvm.c |    7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/hw/intc/spapr_xive_kvm.c b/hw/intc/spapr_xive_kvm.c
> index f2dda692183b..1686b036eb2d 100644
> --- a/hw/intc/spapr_xive_kvm.c
> +++ b/hw/intc/spapr_xive_kvm.c
> @@ -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;
> 
> 

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]