aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorDaniel Henrique Barboza <danielhb413@gmail.com>2020-01-06 15:24:07 -0300
committerCornelia Huck <cohuck@redhat.com>2020-01-27 12:13:09 +0100
commit65569bbf37a68ea957819fc489dab708308e1588 (patch)
tree4a3b33224912e6b8472e3caf97783b1d3ba383b7 /hw
parente6de76fca48012348d8c81b1399c861f444bd4a4 (diff)
intc/s390_flic_kvm.c: remove unneeded label in kvm_flic_load()
'out' label can be replaced by 'return' with the appropriate value that is set by 'r' right before the jump. Cc: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Message-Id: <20200106182425.20312-42-danielhb413@gmail.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/intc/s390_flic_kvm.c10
1 files 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;
}