From 4e53905a9da1736a448ab89f455ce3454de9e633 Mon Sep 17 00:00:00 2001 From: Mikulas Patocka Date: Mon, 13 Jul 2026 21:24:05 +0200 Subject: [PATCH] dm-integrity: clean-up error handling Add "goto bad" to error handling. This commit doesn't fix any bug, just cleans up the code. Signed-off-by: Mikulas Patocka Assisted-by: Claude:claude-opus-4.6 --- drivers/md/dm-integrity.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c index 4daa3dc6caf8..e65aec9b7a28 100644 --- a/drivers/md/dm-integrity.c +++ b/drivers/md/dm-integrity.c @@ -4634,6 +4634,7 @@ static int create_journal(struct dm_integrity_c *ic, char **error) if (!ic->journal_tree) { *error = "Could not allocate memory for journal tree"; r = -ENOMEM; + goto bad; } bad: kfree(crypt_data);