This is just a minor cleanup to make the code look a bit cleaner.
Signed-off-by: Yuntao Wang <[email protected]>
---
init/main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/init/main.c b/init/main.c
index 5dcf5274c09c..d6383e397e9f 100644
--- a/init/main.c
+++ b/init/main.c
@@ -630,11 +630,11 @@ static void __init setup_command_line(char *command_line)
if (extra_init_args)
ilen = strlen(extra_init_args) + 4; /* for " -- " */
- len = xlen + strlen(boot_command_line) + 1;
+ len = xlen + strlen(boot_command_line) + ilen + 1;
- saved_command_line = memblock_alloc(len + ilen, SMP_CACHE_BYTES);
+ saved_command_line = memblock_alloc(len, SMP_CACHE_BYTES);
if (!saved_command_line)
- panic("%s: Failed to allocate %zu bytes\n", __func__, len + ilen);
+ panic("%s: Failed to allocate %zu bytes\n", __func__, len);
len = xlen + strlen(command_line) + 1;
--
2.44.0