block: Simplify qmp_block_resize() error paths
commitd9dbf25f9624aac43e4357019bed4422f0b3368d
authorKevin Wolf <kwolf@redhat.com>
Thu, 3 Dec 2020 17:23:09 +0000 (3 18:23 +0100)
committerKevin Wolf <kwolf@redhat.com>
Fri, 11 Dec 2020 16:52:40 +0000 (11 17:52 +0100)
tree855d125b604b69af9fa9a1c036644be8b73f3634
parent8b1170012b1de6649c66ac1887f4df7e312abf3b
block: Simplify qmp_block_resize() error paths

The only thing that happens after the 'out:' label is blk_unref(blk).
However, blk = NULL in all of the error cases, so instead of jumping to
'out:', we can just return directly.

Cc: qemu-stable@nongnu.org
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20201203172311.68232-2-kwolf@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
blockdev.c