qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-block] [PATCH 2/4] ide/atapi: blk_aio_readv may return NULL


From: Peter Lieven
Subject: [Qemu-block] [PATCH 2/4] ide/atapi: blk_aio_readv may return NULL
Date: Mon, 12 Oct 2015 14:27:23 +0200

Signed-off-by: Peter Lieven <address@hidden>
---
 hw/ide/atapi.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c
index 2271ea2..e0cf066 100644
--- a/hw/ide/atapi.c
+++ b/hw/ide/atapi.c
@@ -429,6 +429,10 @@ static void ide_atapi_cmd_read_dma_cb(void *opaque, int 
ret)
     s->bus->dma->aiocb = blk_aio_readv(s->blk, (int64_t)s->lba << 2,
                                        &s->bus->dma->qiov, n * 4,
                                        ide_atapi_cmd_read_dma_cb, s);
+    if (s->bus->dma->aiocb == NULL) {
+        ide_atapi_io_error(s, -EIO);
+        goto eot;
+    }
     return;
 
 eot:
-- 
1.9.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]