diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2022-04-25 14:56:48 +0300 |
---|---|---|
committer | Mike Snitzer <snitzer@kernel.org> | 2022-05-09 12:14:00 -0400 |
commit | d3f2a14b8906df913cb04a706367b012db94a6e8 (patch) | |
tree | 77bd8b91dc0a2886e41e723544aa5cc2835d25dd | |
parent | bfe2b0146c4d0230b68f5c71a64380ff8d361f8b (diff) | |
download | linux-d3f2a14b8906df913cb04a706367b012db94a6e8.tar.bz2 |
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>
-rw-r--r-- | drivers/md/dm-integrity.c | 2 |
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)) { |