block: fix shadowed variable in bdrv_co_pdiscard

We've had a shadowed 'ret' variable, which risks returning the wrong
value, introduced in commit b9c64947.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20170710150559.30163-1-den@openvz.org
CC: Stefan Hajnoczi <stefanha@redhat.com>
CC: Kevin Wolf <kwolf@redhat.com>
CC: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
Denis V. Lunev 2017-07-10 18:05:59 +03:00 committed by Stefan Hajnoczi
parent 55d41b16ee
commit 593ed6f0a3

View File

@ -2335,7 +2335,6 @@ int coroutine_fn bdrv_co_pdiscard(BlockDriverState *bs, int64_t offset,
assert(max_pdiscard >= bs->bl.request_alignment);
while (bytes > 0) {
int ret;
int num = bytes;
if (head) {