mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
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:
parent
6b574e09b3
commit
109525ad6a
4 changed files with 7 additions and 16 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue