x86/spectre: Check CONFIG_RETPOLINE in command line parser
[pandora-kernel.git] / arch / x86 / kernel / cpu / bugs.c
index 833ec77..db76bc8 100644 (file)
@@ -355,10 +355,10 @@ static void __init spectre_v2_select_mitigation(void)
                return;
 
        case SPECTRE_V2_CMD_FORCE:
-               /* FALLTRHU */
        case SPECTRE_V2_CMD_AUTO:
-               goto retpoline_auto;
-
+               if (IS_ENABLED(CONFIG_RETPOLINE))
+                       goto retpoline_auto;
+               break;
        case SPECTRE_V2_CMD_RETPOLINE_AMD:
                if (IS_ENABLED(CONFIG_RETPOLINE))
                        goto retpoline_amd;