From 91977c2e5f6419d00f4ae2800586f009b6070ab1 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 14 Nov 2011 17:50:51 +0100 Subject: block: qemu_aio_get does not return NULL Initially done with the following semantic patch: @ rule1 @ expression E; statement S; @@ E = qemu_aio_get (...); ( - if (E == NULL) { ... } | - if (E) { <... S ...> } ) which however missed occurrences in linux-aio.c and posix-aio-compat.c. Those were done by hand. The change in vdi_aio_setup's caller was also done by hand. Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- linux-aio.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'linux-aio.c') diff --git a/linux-aio.c b/linux-aio.c index 1c635ef12..d2fc2e7d0 100644 --- a/linux-aio.c +++ b/linux-aio.c @@ -166,8 +166,6 @@ BlockDriverAIOCB *laio_submit(BlockDriverState *bs, void *aio_ctx, int fd, off_t offset = sector_num * 512; laiocb = qemu_aio_get(&laio_pool, bs, cb, opaque); - if (!laiocb) - return NULL; laiocb->nbytes = nb_sectors * 512; laiocb->ctx = s; laiocb->ret = -EINPROGRESS; -- cgit v1.2.3