Skip to content

Commit d3f2a14

Browse files
Dan CarpenterMike Snitzer
authored andcommitted
dm integrity: fix error code in dm_integrity_ctr()
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: [email protected] Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Mikulas Patocka <[email protected]> Signed-off-by: Mike Snitzer <[email protected]>
1 parent bfe2b01 commit d3f2a14

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
@@ -4494,8 +4494,6 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv)
44944494
}
44954495

44964496
if (should_write_sb) {
4497-
int r;
4498-
44994497
init_journal(ic, 0, ic->journal_sections, 0);
45004498
r = dm_integrity_failed(ic);
45014499
if (unlikely(r)) {

0 commit comments

Comments
 (0)