mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 13:37:36 +02:00
dm integrity: fix error code in dm_integrity_ctr()
commitd3f2a14b89upstream. 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:7eada909bf("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>
This commit is contained in:
parent
8845027e55
commit
bb64957c47
|
|
@ -4327,8 +4327,6 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv)
|
|||
}
|
||||
|
||||
if (should_write_sb) {
|
||||
int r;
|
||||
|
||||
init_journal(ic, 0, ic->journal_sections, 0);
|
||||
r = dm_integrity_failed(ic);
|
||||
if (unlikely(r)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user