diff options
-rw-r--r-- | arch/x86/kernel/microcode_core.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c index 4873e62db6a1..63a956865022 100644 --- a/arch/x86/kernel/microcode_core.c +++ b/arch/x86/kernel/microcode_core.c | |||
@@ -276,19 +276,18 @@ static struct platform_device *microcode_pdev; | |||
276 | static int reload_for_cpu(int cpu) | 276 | static int reload_for_cpu(int cpu) |
277 | { | 277 | { |
278 | struct ucode_cpu_info *uci = ucode_cpu_info + cpu; | 278 | struct ucode_cpu_info *uci = ucode_cpu_info + cpu; |
279 | enum ucode_state ustate; | ||
279 | int err = 0; | 280 | int err = 0; |
280 | 281 | ||
281 | if (uci->valid) { | 282 | if (!uci->valid) |
282 | enum ucode_state ustate; | 283 | return err; |
283 | |||
284 | ustate = microcode_ops->request_microcode_fw(cpu, µcode_pdev->dev); | ||
285 | if (ustate == UCODE_OK) | ||
286 | apply_microcode_on_target(cpu); | ||
287 | else | ||
288 | if (ustate == UCODE_ERROR) | ||
289 | err = -EINVAL; | ||
290 | } | ||
291 | 284 | ||
285 | ustate = microcode_ops->request_microcode_fw(cpu, µcode_pdev->dev); | ||
286 | if (ustate == UCODE_OK) | ||
287 | apply_microcode_on_target(cpu); | ||
288 | else | ||
289 | if (ustate == UCODE_ERROR) | ||
290 | err = -EINVAL; | ||
292 | return err; | 291 | return err; |
293 | } | 292 | } |
294 | 293 | ||