aboutsummaryrefslogtreecommitdiff
path: root/hw/block
diff options
context:
space:
mode:
Diffstat (limited to 'hw/block')
-rw-r--r--hw/block/xen-block.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c
index 10c44dfda2..48890536a4 100644
--- a/hw/block/xen-block.c
+++ b/hw/block/xen-block.c
@@ -412,8 +412,7 @@ static void xen_block_set_vdev(Object *obj, Visitor *v, const char *name,
return;
}
- visit_type_str(v, name, &str, &local_err);
- if (local_err) {
+ if (!visit_type_str(v, name, &str, &local_err)) {
error_propagate(errp, local_err);
return;
}