Re: [PATCH 1/3] block: Simplify qmp_block_resize() error paths

2020-12-08 Thread Kevin Wolf
Am 08.12.2020 um 15:15 hat Vladimir Sementsov-Ogievskiy geschrieben: > 03.12.2020 20:23, Kevin Wolf wrote: > > 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. >

Re: [PATCH 1/3] block: Simplify qmp_block_resize() error paths

2020-12-08 Thread Vladimir Sementsov-Ogievskiy
03.12.2020 20:23, Kevin Wolf wrote: 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-sta...@nongnu.org Signed-off-by: Kevin Wolf --- blockdev.c | 7 +++---

[PATCH 1/3] block: Simplify qmp_block_resize() error paths

2020-12-03 Thread Kevin Wolf
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-sta...@nongnu.org Signed-off-by: Kevin Wolf --- blockdev.c | 7 +++ 1 file changed, 3 insertions(+), 4 d