aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-02-05 22:05:53 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-02-05 22:05:53 +0000
commit3ec88e80365c889f824d9a171fbf197b46a7c03f (patch)
treef0746a9234070ab3b86fd953827300eb21a0f7bb /block.c
parent8a1d02aba9f986ca03d854184cd432ee98bcd179 (diff)
block: remove error handling from qemu_malloc() callers (Avi Kivity)
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6527 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'block.c')
-rw-r--r--block.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/block.c b/block.c
index b3d2f12090..4f4bf7ceef 100644
--- a/block.c
+++ b/block.c
@@ -151,8 +151,6 @@ BlockDriverState *bdrv_new(const char *device_name)
BlockDriverState **pbs, *bs;
bs = qemu_mallocz(sizeof(BlockDriverState));
- if(!bs)
- return NULL;
pstrcpy(bs->device_name, sizeof(bs->device_name), device_name);
if (device_name[0] != '\0') {
/* insert at the end */
@@ -395,8 +393,6 @@ int bdrv_open2(BlockDriverState *bs, const char *filename, int flags,
}
bs->drv = drv;
bs->opaque = qemu_mallocz(drv->instance_size);
- if (bs->opaque == NULL && drv->instance_size > 0)
- return -1;
/* Note: for compatibility, we open disk image files as RDWR, and
RDONLY as fallback */
if (!(flags & BDRV_O_FILE))
@@ -1498,8 +1494,6 @@ void *qemu_aio_get(BlockDriverState *bs, BlockDriverCompletionFunc *cb,
drv->free_aiocb = acb->next;
} else {
acb = qemu_mallocz(drv->aiocb_size);
- if (!acb)
- return NULL;
}
acb->bs = bs;
acb->cb = cb;