[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH] scsi: Don't check uninitialized local variable
From: |
Fam Zheng |
Subject: |
[Qemu-block] [PATCH] scsi: Don't check uninitialized local variable |
Date: |
Mon, 8 Jan 2018 11:09:46 +0800 |
After the out label there is a check on iTask.task but it is not
initialized yet.
Fixes: e38bc23454ef763deb4405ebdee6a1081aa00bc8
Signed-off-by: Fam Zheng <address@hidden>
---
block/iscsi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/block/iscsi.c b/block/iscsi.c
index 5c0a9e55b6..1cb8cc93c5 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -659,8 +659,7 @@ static int64_t coroutine_fn
iscsi_co_get_block_status(BlockDriverState *bs,
int64_t ret;
if (!is_sector_request_lun_aligned(sector_num, nb_sectors, iscsilun)) {
- ret = -EINVAL;
- goto out;
+ return -EINVAL;
}
/* default to all sectors allocated */
--
2.14.3
- [Qemu-block] [PATCH] scsi: Don't check uninitialized local variable,
Fam Zheng <=