iscsi: Remember to set ret for iscsi_open in error case
authorFam Zheng <famz@redhat.com>
Thu, 10 Apr 2014 01:33:55 +0000 (09:33 +0800)
committerKevin Wolf <kwolf@redhat.com>
Fri, 11 Apr 2014 11:59:49 +0000 (13:59 +0200)
Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/iscsi.c

index 64a509f8f43eedb815ada868ed02b9464b036d27..f425573df8e6c13a240889ba2f252934965703b9 100644 (file)
@@ -1233,6 +1233,7 @@ static int iscsi_open(BlockDriverState *bs, QDict *options, int flags,
     iscsi_readcapacity_sync(iscsilun, &local_err);
     if (local_err != NULL) {
         error_propagate(errp, local_err);
+        ret = -EINVAL;
         goto out;
     }
     bs->total_sectors = sector_lun2qemu(iscsilun->num_blocks, iscsilun);