aboutsummaryrefslogtreecommitdiff
path: root/block/file-posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/file-posix.c')
-rw-r--r--block/file-posix.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/block/file-posix.c b/block/file-posix.c
index d86ea57..36acf7b 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -490,8 +490,7 @@ static int raw_open_common(BlockDriverState *bs, QDict *options,
OnOffAuto locking;
opts = qemu_opts_create(&raw_runtime_opts, NULL, 0, &error_abort);
- qemu_opts_absorb_qdict(opts, options, &local_err);
- if (local_err) {
+ if (!qemu_opts_absorb_qdict(opts, options, &local_err)) {
error_propagate(errp, local_err);
ret = -EINVAL;
goto fail;
@@ -1000,8 +999,7 @@ static int raw_reopen_prepare(BDRVReopenState *state,
/* Handle options changes */
opts = qemu_opts_create(&raw_runtime_opts, NULL, 0, &error_abort);
- qemu_opts_absorb_qdict(opts, state->options, &local_err);
- if (local_err) {
+ if (!qemu_opts_absorb_qdict(opts, state->options, &local_err)) {
error_propagate(errp, local_err);
ret = -EINVAL;
goto out;