From: Dan Carpenter Date: Fri, 12 Dec 2014 19:30:00 +0000 (+0300) Subject: Btrfs, scrub: uninitialized variable in scrub_extent_for_parity() X-Git-Tag: v5.15~16552^2~4 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=6b6d24b38991f72fe974215c96e0fdfe409ea50e;p=mirror_ubuntu-kernels.git Btrfs, scrub: uninitialized variable in scrub_extent_for_parity() The only way that "ret" is set is when we call scrub_pages_for_parity() so the skip to "if (ret) " test doesn't make sense and causes a static checker warning. Signed-off-by: Dan Carpenter Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index f2bb13a23f86..9e1569ffbf6e 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c @@ -2607,9 +2607,9 @@ static int scrub_extent_for_parity(struct scrub_parity *sparity, ret = scrub_pages_for_parity(sparity, logical, l, physical, dev, flags, gen, mirror_num, have_csum ? csum : NULL); -skip: if (ret) return ret; +skip: len -= l; logical += l; physical += l;