diff options
author | Max Reitz | 2016-05-17 16:41:34 +0200 |
---|---|---|
committer | Kevin Wolf | 2016-05-25 19:04:10 +0200 |
commit | 109525ad6a2f5d720ee0802df7ab1e3decbeeb21 (patch) | |
tree | adfddb9a0499e8ff6b03117829316aba42211ba7 /block | |
parent | block: Drop bdrv_parent_cb_...() from bdrv_close() (diff) | |
download | qemu-109525ad6a2f5d720ee0802df7ab1e3decbeeb21.tar.gz qemu-109525ad6a2f5d720ee0802df7ab1e3decbeeb21.tar.xz qemu-109525ad6a2f5d720ee0802df7ab1e3decbeeb21.zip |
block: Drop errp parameter from blk_new()
blk_new() cannot fail so its Error ** parameter has become superfluous.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-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); |