Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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.com


Acked-by: default avatarBorislav Petkov <bp@suse.de>
Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
parent f155b630
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -220,10 +220,11 @@ int apply_microcode_amd(int cpu)
		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",
			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);