diff options
Diffstat (limited to 'block/block-backend.c')
-rw-r--r-- | block/block-backend.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/block/block-backend.c b/block/block-backend.c index bc1f071354..4e8298b291 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -119,7 +119,7 @@ static const BdrvChildRole child_root = { * Store an error through @errp on failure, unless it's null. * Return the new BlockBackend on success, null on failure. */ -BlockBackend *blk_new(Error **errp) +BlockBackend *blk_new(void) { BlockBackend *blk; @@ -153,12 +153,7 @@ BlockBackend *blk_new_open(const char *filename, const char *reference, BlockBackend *blk; BlockDriverState *bs; - blk = blk_new(errp); - if (!blk) { - QDECREF(options); - return NULL; - } - + blk = blk_new(); bs = bdrv_open(filename, reference, options, flags, errp); if (!bs) { blk_unref(blk); |