diff options
author | Markus Armbruster | 2020-03-13 18:05:17 +0100 |
---|---|---|
committer | Markus Armbruster | 2020-03-17 17:29:31 +0100 |
commit | 526ab8e8630f17f6f412c160d4e9571766960be9 (patch) | |
tree | 7982d72a2db5b2d9d3a430b65d0dbd1f9392d3a9 /hw/block/xen-block.c | |
parent | hw/misc/ivshmem: Use one Error * variable instead of two (diff) | |
download | qemu-526ab8e8630f17f6f412c160d4e9571766960be9.tar.gz qemu-526ab8e8630f17f6f412c160d4e9571766960be9.tar.xz qemu-526ab8e8630f17f6f412c160d4e9571766960be9.zip |
xen-block: Use one Error * variable instead of two
While there, tidy up indentation, and add return just for consistency
and robustness.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20200313170517.22480-4-armbru@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
[The "while there" cleanups squashed in]
Diffstat (limited to 'hw/block/xen-block.c')
-rw-r--r-- | hw/block/xen-block.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c index 3885464513..07bb32e22b 100644 --- a/hw/block/xen-block.c +++ b/hw/block/xen-block.c @@ -998,29 +998,27 @@ static void xen_block_device_destroy(XenBackendInstance *backend, XenBlockVdev *vdev = &blockdev->props.vdev; XenBlockDrive *drive = blockdev->drive; XenBlockIOThread *iothread = blockdev->iothread; + Error *local_err = NULL; trace_xen_block_device_destroy(vdev->number); object_unparent(OBJECT(xendev)); if (iothread) { - Error *local_err = NULL; - xen_block_iothread_destroy(iothread, &local_err); if (local_err) { error_propagate_prepend(errp, local_err, - "failed to destroy iothread: "); + "failed to destroy iothread: "); return; } } if (drive) { - Error *local_err = NULL; - xen_block_drive_destroy(drive, &local_err); if (local_err) { error_propagate_prepend(errp, local_err, - "failed to destroy drive: "); + "failed to destroy drive: "); + return; } } } |