Commit d982057f authored by Torsten Kaiser's avatar Torsten Kaiser Committed by H. Peter Anvin

x86, amd, microcode: Fix error path in apply_microcode_amd()

Return -1 (like Intels apply_microcode) when the loading fails, also
do not set the active microcode level on failure.
Signed-off-by: default avatarTorsten Kaiser <just.for.lkml@googlemail.com>
Link: http://lkml.kernel.org/r/20130723225823.2e4e7588@googlemail.comAcked-by: default avatarBorislav Petkov <bp@suse.de>
Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
parent f155b630
...@@ -220,12 +220,13 @@ int apply_microcode_amd(int cpu) ...@@ -220,12 +220,13 @@ int apply_microcode_amd(int cpu)
return 0; return 0;
} }
if (__apply_microcode_amd(mc_amd)) if (__apply_microcode_amd(mc_amd)) {
pr_err("CPU%d: update failed for patch_level=0x%08x\n", pr_err("CPU%d: update failed for patch_level=0x%08x\n",
cpu, mc_amd->hdr.patch_id); cpu, mc_amd->hdr.patch_id);
else return -1;
pr_info("CPU%d: new patch_level=0x%08x\n", cpu, }
mc_amd->hdr.patch_id); pr_info("CPU%d: new patch_level=0x%08x\n", cpu,
mc_amd->hdr.patch_id);
uci->cpu_sig.rev = mc_amd->hdr.patch_id; uci->cpu_sig.rev = mc_amd->hdr.patch_id;
c->microcode = mc_amd->hdr.patch_id; c->microcode = mc_amd->hdr.patch_id;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment