Btrfs, scrub: uninitialized variable in scrub_extent_for_parity()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 12 Dec 2014 19:30:00 +0000 (22:30 +0300)
committerChris Mason <clm@fb.com>
Fri, 2 Jan 2015 19:47:55 +0000 (14:47 -0500)
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 <dan.carpenter@oracle.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/scrub.c

index f2bb13a23f860ea19d0403057395d38d8b9d2632..9e1569ffbf6ea66f1324022db9f9aba559339c73 100644 (file)
@@ -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;