From cd82b6fb4daf87f17742f7971ba6cb90d23e6703 Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Thu, 10 Apr 2014 09:33:55 +0800 Subject: [PATCH] iscsi: Remember to set ret for iscsi_open in error case Signed-off-by: Fam Zheng Signed-off-by: Kevin Wolf --- block/iscsi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/iscsi.c b/block/iscsi.c index 64a509f8f4..f425573df8 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -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);