aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/microcode_amd.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/microcode_amd.c')
-rw-r--r--arch/x86/kernel/microcode_amd.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c
index 384990d2c54d..d80e943a39f3 100644
--- a/arch/x86/kernel/microcode_amd.c
+++ b/arch/x86/kernel/microcode_amd.c
@@ -282,11 +282,11 @@ generic_load_microcode(int cpu, const u8 *data, size_t size)
282 mc_hdr = patch; 282 mc_hdr = patch;
283 new_mc = patch; 283 new_mc = patch;
284 new_rev = mc_hdr->patch_id; 284 new_rev = mc_hdr->patch_id;
285 leftover -= mc_size; 285 goto out_ok;
286 } else {
287 ucode_ptr += current_size;
288 leftover -= current_size;
289 } 286 }
287
288 ucode_ptr += current_size;
289 leftover -= current_size;
290 } 290 }
291 291
292 if (!new_mc) { 292 if (!new_mc) {
@@ -294,15 +294,11 @@ generic_load_microcode(int cpu, const u8 *data, size_t size)
294 goto free_table; 294 goto free_table;
295 } 295 }
296 296
297 if (!leftover) { 297out_ok:
298 uci->mc = new_mc; 298 uci->mc = new_mc;
299 state = UCODE_OK; 299 state = UCODE_OK;
300 pr_debug("CPU%d update ucode (0x%08x -> 0x%08x)\n", 300 pr_debug("CPU%d update ucode (0x%08x -> 0x%08x)\n",
301 cpu, uci->cpu_sig.rev, new_rev); 301 cpu, uci->cpu_sig.rev, new_rev);
302 } else {
303 new_mc = NULL;
304 state = UCODE_ERROR;
305 }
306 302
307free_table: 303free_table:
308 free_equiv_cpu_table(); 304 free_equiv_cpu_table();