qcow2: remove unnecessary check
authorAlberto Garcia <berto@igalia.com>
Thu, 2 Jul 2015 08:06:11 +0000 (11:06 +0300)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 7 Jul 2015 09:31:04 +0000 (10:31 +0100)
The value of 'i' is guaranteed to be >= 0

Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-id: 1435824371-2660-1-git-send-email-berto@igalia.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/qcow2-cache.c

index ed92a098c4f11111e6d2df54bb76a95ad1d1f83b..53b8afc3d3c3ecdad24bb5c24afeb2020db87c3f 100644 (file)
@@ -281,9 +281,6 @@ static int qcow2_cache_do_get(BlockDriverState *bs, Qcow2Cache *c,
     i = min_lru_index;
     trace_qcow2_cache_get_replace_entry(qemu_coroutine_self(),
                                         c == s->l2_table_cache, i);
-    if (i < 0) {
-        return i;
-    }
 
     ret = qcow2_cache_entry_flush(bs, c, i);
     if (ret < 0) {