aboutsummaryrefslogtreecommitdiff
path: root/block/nbd.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/nbd.c')
-rw-r--r--block/nbd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/block/nbd.c b/block/nbd.c
index 1b30d96a4f..1331307ffb 100644
--- a/block/nbd.c
+++ b/block/nbd.c
@@ -1739,8 +1739,7 @@ static SocketAddress *nbd_config(BDRVNBDState *s, QDict *options,
goto done;
}
- visit_type_SocketAddress(iv, NULL, &saddr, &local_err);
- if (local_err) {
+ if (!visit_type_SocketAddress(iv, NULL, &saddr, &local_err)) {
error_propagate(errp, local_err);
goto done;
}