Commit d3f2a14b authored by Dan Carpenter's avatar Dan Carpenter Committed by Mike Snitzer

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: 7eada909 ("dm: add integrity target")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@kernel.org>
parent bfe2b014
...@@ -4494,8 +4494,6 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv) ...@@ -4494,8 +4494,6 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv)
} }
if (should_write_sb) { if (should_write_sb) {
int r;
init_journal(ic, 0, ic->journal_sections, 0); init_journal(ic, 0, ic->journal_sections, 0);
r = dm_integrity_failed(ic); r = dm_integrity_failed(ic);
if (unlikely(r)) { if (unlikely(r)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment