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

Signed-off-by: Mikulas Patocka <[email protected]>
Assisted-by: Claude:claude-opus-4.6

---
 drivers/md/dm-integrity.c |    1 +
 1 file changed, 1 insertion(+)

Index: linux-2.6/drivers/md/dm-integrity.c
===================================================================
--- linux-2.6.orig/drivers/md/dm-integrity.c    2026-07-13 20:59:52.000000000 
+0200
+++ linux-2.6/drivers/md/dm-integrity.c 2026-07-13 20:59:52.000000000 +0200
@@ -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);


Reply via email to