summaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
Diffstat (limited to 'block.c')
-rw-r--r--block.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/block.c b/block.c
index d24ae85868..98a9209371 100644
--- a/block.c
+++ b/block.c
@@ -4254,11 +4254,9 @@ bool bdrv_op_is_blocked(BlockDriverState *bs, BlockOpType op, Error **errp)
assert((int) op >= 0 && op < BLOCK_OP_TYPE_MAX);
if (!QLIST_EMPTY(&bs->op_blockers[op])) {
blocker = QLIST_FIRST(&bs->op_blockers[op]);
- if (errp) {
- *errp = error_copy(blocker->reason);
- error_prepend(errp, "Node '%s' is busy: ",
- bdrv_get_device_or_node_name(bs));
- }
+ error_propagate(errp, error_copy(blocker->reason));
+ error_prepend(errp, "Node '%s' is busy: ",
+ bdrv_get_device_or_node_name(bs));
return true;
}
return false;