Skip to contentSkip to conversation

dm-integrity: clean-up error handling

PATCH New Mikulas Patocka 1 participant 1 message Jul 13 Device mapper

lore
Share & tools
lore

Mikulas Patocka

author maintainer
#0 lore raw

PATCH 1/1 dm-integrity: clean-up error handling

Add "goto bad" to error handling. This commit doesn't fix any bug, just cleans up the code.

Assisted-by Claude:claude-opus-4.6
---
 drivers/md/dm-integrity.c |    1 +
 1 file changed, 1 insertion(+)
drivers/md/dm-integrity.c +1 -0
Index: linux-2.6/drivers/md/dm-integrity.c
===================================================================
@@ -4634,6 +4634,7 @@ retest_commit_id:
 	if (!ic->journal_tree) {
 		*error = "Could not allocate memory for journal tree";
 		r = -ENOMEM;
+		goto bad;
 	}
 bad:
 	kfree(crypt_data);