diff options
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/microcode_amd.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c index c8be20f16447..366baa179913 100644 --- a/arch/x86/kernel/microcode_amd.c +++ b/arch/x86/kernel/microcode_amd.c | |||
@@ -241,10 +241,8 @@ static int install_equiv_cpu_table(const u8 *buf) | |||
241 | 241 | ||
242 | static void free_equiv_cpu_table(void) | 242 | static void free_equiv_cpu_table(void) |
243 | { | 243 | { |
244 | if (equiv_cpu_table) { | 244 | vfree(equiv_cpu_table); |
245 | vfree(equiv_cpu_table); | 245 | equiv_cpu_table = NULL; |
246 | equiv_cpu_table = NULL; | ||
247 | } | ||
248 | } | 246 | } |
249 | 247 | ||
250 | static enum ucode_state | 248 | static enum ucode_state |
@@ -279,8 +277,7 @@ generic_load_microcode(int cpu, const u8 *data, size_t size) | |||
279 | 277 | ||
280 | mc_header = (struct microcode_header_amd *)mc; | 278 | mc_header = (struct microcode_header_amd *)mc; |
281 | if (get_matching_microcode(cpu, mc, new_rev)) { | 279 | if (get_matching_microcode(cpu, mc, new_rev)) { |
282 | if (new_mc) | 280 | vfree(new_mc); |
283 | vfree(new_mc); | ||
284 | new_rev = mc_header->patch_id; | 281 | new_rev = mc_header->patch_id; |
285 | new_mc = mc; | 282 | new_mc = mc; |
286 | } else | 283 | } else |
@@ -292,8 +289,7 @@ generic_load_microcode(int cpu, const u8 *data, size_t size) | |||
292 | 289 | ||
293 | if (new_mc) { | 290 | if (new_mc) { |
294 | if (!leftover) { | 291 | if (!leftover) { |
295 | if (uci->mc) | 292 | vfree(uci->mc); |
296 | vfree(uci->mc); | ||
297 | uci->mc = new_mc; | 293 | uci->mc = new_mc; |
298 | pr_debug("microcode: CPU%d found a matching microcode " | 294 | pr_debug("microcode: CPU%d found a matching microcode " |
299 | "update with version 0x%x (current=0x%x)\n", | 295 | "update with version 0x%x (current=0x%x)\n", |