[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: |
Cornelia Huck |
Subject: |
Re: [PATCH v1 41/59] intc/s390_flic_kvm.c: remove unneeded label in kvm_flic_load() |
Date: |
Wed, 8 Jan 2020 14:00:46 +0100 |
On Mon, 6 Jan 2020 15:24:07 -0300
Daniel Henrique Barboza <address@hidden> wrote:
> 'out' label can be replaced by 'return' with the apropriate
> value that is set by 'r' right before the jump.
>
> Christian Borntraeger <address@hidden>
I think something went wrong here; adding some cc:s.
> 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;
> }
>
Looks fine to me; will apply unless someone sees an issue.
- Re: [PATCH v1 38/59] s390x/sclp.c: remove unneeded label in sclp_service_call(), (continued)
- [PATCH v1 09/59] chardev/char-pipe.c: remove 'fail' label in win_chr_pipe_init(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 18/59] qcow2-refcount.c: remove unneeded 'fail' label in qcow2_refcount_init(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 23/59] block/vxhs.c: remove unneeded 'out' label in vxhs_iio_callback(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 31/59] util/aio-posix.c: remove unneeded 'out' label in aio_epoll, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 33/59] ipmi/ipmi_bmc_sim.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 39/59] usb/dev-mtp.c: remove unneeded label in write_retry(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 41/59] intc/s390_flic_kvm.c: remove unneeded label in kvm_flic_load(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 44/59] 9p-local.c: remove unneeded label in local_unlinkat_common(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 45/59] 9pfs/9p.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06