Skip to content

Commit bb64957

Browse files
Dan Carpentergregkh
authored andcommitted
dm integrity: fix error code in dm_integrity_ctr()
commit d3f2a14 upstream. The "r" variable shadows an earlier "r" that has function scope. It means that we accidentally return success instead of an error code. Smatch has a warning for this: drivers/md/dm-integrity.c:4503 dm_integrity_ctr() warn: missing error code 'r' Fixes: 7eada90 ("dm: add integrity target") Cc: stable@vger.kernel.org Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 8845027 commit bb64957

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/md/dm-integrity.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4327,8 +4327,6 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv)
43274327
}
43284328

43294329
if (should_write_sb) {
4330-
int r;
4331-
43324330
init_journal(ic, 0, ic->journal_sections, 0);
43334331
r = dm_integrity_failed(ic);
43344332
if (unlikely(r)) {

0 commit comments

Comments
 (0)