mirror of
https://github.com/mii443/qemu.git
synced 2025-12-12 13:28:43 +00:00
qcow2: Remove dead check on !ret
In the beginning of the function, we initialize the local variable to 0, and in the body of the function, we check the assigned values and exit the loop immediately. So here it can never be non-zero. Reported-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
@@ -1772,7 +1772,7 @@ static coroutine_fn int qcow2_handle_l2meta(BlockDriverState *bs,
|
|||||||
while (l2meta != NULL) {
|
while (l2meta != NULL) {
|
||||||
QCowL2Meta *next;
|
QCowL2Meta *next;
|
||||||
|
|
||||||
if (!ret && link_l2) {
|
if (link_l2) {
|
||||||
ret = qcow2_alloc_cluster_link_l2(bs, l2meta);
|
ret = qcow2_alloc_cluster_link_l2(bs, l2meta);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
goto out;
|
goto out;
|
||||||
|
|||||||
Reference in New Issue
Block a user