summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2022-04-25 13:56:48 +0200
committerMike Snitzer <snitzer@kernel.org>2022-05-09 18:14:00 +0200
commitd3f2a14b8906df913cb04a706367b012db94a6e8 (patch)
tree77bd8b91dc0a2886e41e723544aa5cc2835d25dd /drivers/md
parentdm stats: add cond_resched when looping over entries (diff)
downloadlinux-d3f2a14b8906df913cb04a706367b012db94a6e8.tar.xz
linux-d3f2a14b8906df913cb04a706367b012db94a6e8.zip
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: 7eada909bfd7 ("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>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-integrity.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c
index 36ae30b73a6e..3d5a0ce123c9 100644
--- a/drivers/md/dm-integrity.c
+++ b/drivers/md/dm-integrity.c
@@ -4494,8 +4494,6 @@ try_smaller_buffer:
}
if (should_write_sb) {
- int r;
-
init_journal(ic, 0, ic->journal_sections, 0);
r = dm_integrity_failed(ic);
if (unlikely(r)) {