From 38fa6feebd2f00309b96388f85e6865d5c25f6f5 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 7 Dec 2022 16:16:00 +0100 Subject: [KERNEL] Fix a copy/paste error acessing wrong variable in sanity check --- src/kernel/xloop_file_fmt_qcow_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel/xloop_file_fmt_qcow_main.c b/src/kernel/xloop_file_fmt_qcow_main.c index 8eb7b52..4764435 100644 --- a/src/kernel/xloop_file_fmt_qcow_main.c +++ b/src/kernel/xloop_file_fmt_qcow_main.c @@ -1129,7 +1129,7 @@ static int __qcow_file_fmt_read_bvec(struct xloop_file_fmt *xlo_fmt, struct bio_ mutex_unlock(&qcow_data->global_mutex); if (ret < 0) goto fail; - if (len == 0) { + if (ret == 0) { dev_err(xloop_file_fmt_to_dev(xlo_fmt), "Unexpected empty read in compressed cluster\n"); ret = -EIO; goto fail; -- cgit v1.2.3-55-g7522