Commit ddd53363 authored by Yuntao Wang's avatar Yuntao Wang Committed by Masami Hiramatsu (Google)
Browse files

init/main.c: Minor cleanup for the setup_command_line() function

This is just a minor cleanup to make the code look a bit cleaner.

Link: https://lore.kernel.org/all/20240412081733.35925-3-ytcoode@gmail.com/



Signed-off-by: default avatarYuntao Wang <ytcoode@gmail.com>
Signed-off-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
parent cd24bdb0
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -633,11 +633,11 @@ static void __init setup_command_line(char *command_line)
		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;