qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] scsi: Don't check uninitialized local variable
@ 2018-01-08  3:09 Fam Zheng
  2018-01-08 13:20 ` Peter Lieven
  2018-01-09 18:05 ` Paolo Bonzini
  0 siblings, 2 replies; 5+ messages in thread
From: Fam Zheng @ 2018-01-08  3:09 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Peter Lieven, qemu-block

After the out label there is a check on iTask.task but it is not
initialized yet.

Fixes: e38bc23454ef763deb4405ebdee6a1081aa00bc8
Signed-off-by: Fam Zheng <famz@redhat.com>
---
 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-01-09 18:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-08  3:09 [Qemu-devel] [PATCH] scsi: Don't check uninitialized local variable Fam Zheng
2018-01-08 13:20 ` Peter Lieven
2018-01-08 15:05   ` Eric Blake
2018-01-09 18:05 ` Paolo Bonzini
2018-01-09 18:14   ` Eric Blake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).