'fail' label can be replaced by 'return ret' and 'return -ENOMEM' calls. CC: Kevin Wolf <kw...@redhat.com> CC: Max Reitz <mre...@redhat.com> CC: qemu-bl...@nongnu.org Signed-off-by: Daniel Henrique Barboza <danielhb...@gmail.com> --- block/qcow2-refcount.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index f67ac6b2d8..1fe66677d1 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -111,22 +111,19 @@ int qcow2_refcount_init(BlockDriverState *bs) if (s->refcount_table_size > 0) { if (s->refcount_table == NULL) { - ret = -ENOMEM; - goto fail; + return -ENOMEM; } BLKDBG_EVENT(bs->file, BLKDBG_REFTABLE_LOAD); ret = bdrv_pread(bs->file, s->refcount_table_offset, s->refcount_table, refcount_table_size2); if (ret < 0) { - goto fail; + return ret; } for(i = 0; i < s->refcount_table_size; i++) be64_to_cpus(&s->refcount_table[i]); update_max_refcount_table_index(s); } return 0; - fail: - return ret; } void qcow2_refcount_close(BlockDriverState *bs) -- 2.24.1