From: Thorsten Blum <thorsten.blum@linux.dev>
To: Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>
Cc: Thorsten Blum <thorsten.blum@linux.dev>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] initrd: Remove unnecessary goto label 'successful_load'
Date: Sat, 13 Sep 2025 14:15:14 +0200 [thread overview]
Message-ID: <20250913121514.1789204-1-thorsten.blum@linux.dev> (raw)
The goto label 'successful_load' isn't really necessary. Set 'res = 1'
immediately and let 'goto done' handle the rest.
No functional changes.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
init/do_mounts_rd.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c
index ac021ae6e6fa..97ddcdaba893 100644
--- a/init/do_mounts_rd.c
+++ b/init/do_mounts_rd.c
@@ -210,7 +210,7 @@ int __init rd_load_image(char *from)
if (nblocks == 0) {
if (crd_load(decompressor) == 0)
- goto successful_load;
+ res = 1; /* load successful */
goto done;
}
@@ -264,8 +264,6 @@ int __init rd_load_image(char *from)
}
pr_cont("done.\n");
-successful_load:
- res = 1;
done:
fput(in_file);
noclose_input:
--
2.51.0
next reply other threads:[~2025-09-13 12:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-13 12:15 Thorsten Blum [this message]
2025-09-13 13:11 ` [PATCH] initrd: Remove unnecessary goto label 'successful_load' Klara Modin
2025-09-13 13:30 ` Thorsten Blum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250913121514.1789204-1-thorsten.blum@linux.dev \
--to=thorsten.blum@linux.dev \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox