qemu-trivial
[Top][All Lists]
Advanced

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

Re: [PATCH v1 41/59] intc/s390_flic_kvm.c: remove unneeded label in kvm_


From: Thomas Huth
Subject: Re: [PATCH v1 41/59] intc/s390_flic_kvm.c: remove unneeded label in kvm_flic_load()
Date: Mon, 13 Jan 2020 17:06:09 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 06/01/2020 19.24, Daniel Henrique Barboza wrote:
> 'out' label can be replaced by 'return' with the apropriate

s/apropriate/appropriate/

> value that is set by 'r' right before the jump.
> 
> Christian Borntraeger <address@hidden>

Missing "Cc:" ? With this line and the typo removed/fixed:

Reviewed-by: Thomas Huth <address@hidden>


> Signed-off-by: Daniel Henrique Barboza <address@hidden>
> ---
>  hw/intc/s390_flic_kvm.c | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/hw/intc/s390_flic_kvm.c b/hw/intc/s390_flic_kvm.c
> index dddd33ea61..2e1e70c61d 100644
> --- a/hw/intc/s390_flic_kvm.c
> +++ b/hw/intc/s390_flic_kvm.c
> @@ -439,17 +439,14 @@ static int kvm_flic_load(QEMUFile *f, void *opaque, 
> size_t size,
>      count = qemu_get_be64(f);
>      len = count * sizeof(struct kvm_s390_irq);
>      if (count == FLIC_FAILED) {
> -        r = -EINVAL;
> -        goto out;
> +        return -EINVAL;
>      }
>      if (count == 0) {
> -        r = 0;
> -        goto out;
> +        return 0;
>      }
>      buf = g_try_malloc0(len);
>      if (!buf) {
> -        r = -ENOMEM;
> -        goto out;
> +        return -ENOMEM;
>      }
>  
>      if (qemu_get_buffer(f, (uint8_t *) buf, len) != len) {
> @@ -460,7 +457,6 @@ static int kvm_flic_load(QEMUFile *f, void *opaque, 
> size_t size,
>  
>  out_free:
>      g_free(buf);
> -out:
>      return r;
>  }
>  
> 




reply via email to

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