aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
Diffstat (limited to 'block.c')
-rw-r--r--block.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block.c b/block.c
index dd4f58d6cb..3bdc995d40 100644
--- a/block.c
+++ b/block.c
@@ -2698,7 +2698,7 @@ void bdrv_add_key(BlockDriverState *bs, const char *key, Error **errp)
error_setg(errp, "Node '%s' is not encrypted",
bdrv_get_device_or_node_name(bs));
} else if (bdrv_set_key(bs, key) < 0) {
- error_set(errp, QERR_INVALID_PASSWORD);
+ error_setg(errp, QERR_INVALID_PASSWORD);
}
} else {
if (bdrv_key_required(bs)) {