summaryrefslogtreecommitdiff
path: root/block/block-backend.c
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2016-05-17 16:41:34 +0200
committerKevin Wolf <kwolf@redhat.com>2016-05-25 19:04:10 +0200
commit109525ad6a2f5d720ee0802df7ab1e3decbeeb21 (patch)
treeadfddb9a0499e8ff6b03117829316aba42211ba7 /block/block-backend.c
parent6b574e09b34a10dbf8d9fb58aeaad77493826b97 (diff)
downloadqemu-109525ad6a2f5d720ee0802df7ab1e3decbeeb21.tar.gz
qemu-109525ad6a2f5d720ee0802df7ab1e3decbeeb21.tar.bz2
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/block-backend.c')
-rw-r--r--block/block-backend.c9
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);