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>
This commit is contained in:
Max Reitz 2016-05-17 16:41:34 +02:00 committed by Kevin Wolf
parent 6b574e09b3
commit 109525ad6a
4 changed files with 7 additions and 16 deletions

View file

@ -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);