perf expr: Fix memory leaks in metric bison
[linux-2.6-microblaze.git] / init / main.c
index 1a5da2c..0337197 100644 (file)
@@ -400,9 +400,8 @@ static void __init setup_boot_config(const char *cmdline)
        char *data, *copy;
        int ret;
 
+       /* Cut out the bootconfig data even if we have no bootconfig option */
        data = get_boot_config_from_initrd(&size, &csum);
-       if (!data)
-               goto not_found;
 
        strlcpy(tmp_cmdline, boot_command_line, COMMAND_LINE_SIZE);
        parse_args("bootconfig", tmp_cmdline, NULL, 0, 0, 0, NULL,
@@ -411,6 +410,11 @@ static void __init setup_boot_config(const char *cmdline)
        if (!bootconfig_found)
                return;
 
+       if (!data) {
+               pr_err("'bootconfig' found on command line, but no bootconfig found\n");
+               return;
+       }
+
        if (size >= XBC_DATA_MAX) {
                pr_err("bootconfig size %d greater than max size %d\n",
                        size, XBC_DATA_MAX);
@@ -446,8 +450,6 @@ static void __init setup_boot_config(const char *cmdline)
                extra_init_args = xbc_make_cmdline("init");
        }
        return;
-not_found:
-       pr_err("'bootconfig' found on command line, but no bootconfig found\n");
 }
 
 #else
@@ -1036,6 +1038,8 @@ asmlinkage __visible void __init start_kernel(void)
 
        /* Do the rest non-__init'ed, we're now alive */
        arch_call_rest_init();
+
+       prevent_tail_call_optimization();
 }
 
 /* Call all constructor functions linked into the kernel. */