vhost: simplify vhost_dev_init() fail_busyloop label
commit1d8d014e936a49795de95a35a2a1ab8000ab2e5b
authorStefan Hajnoczi <stefanha@redhat.com>
Mon, 22 Feb 2021 11:49:31 +0000 (22 11:49 +0000)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 2 Mar 2021 14:16:18 +0000 (2 09:16 -0500)
tree3aaf9f69f6b61949f3343ea8cbdc943780281e88
parentb52fa0ea45bea494a953dd766151d584a28e87e5
vhost: simplify vhost_dev_init() fail_busyloop label

Requiring a conditional for every goto is tedious:

  if (busyloop_timeout) {
      goto fail_busyloop;
  } else {
      goto fail;
  }

Move the conditional to into the fail_busyloop label so that it's safe
to jump to this label unconditionally.

This change makes the migrate_add_blocker() error case more consistent.
It jumped to fail_busyloop unconditionally whereas the memslots limits
error case was conditional.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20210222114931.272308-1-stefanha@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/vhost.c