[v2 12/13] x86/microcode: Display revisions only when update is successful

From: Ashok Raj
Date: Thu Nov 03 2022 - 14:00:24 EST


Display the update message only when its successful

Reviewed-by: Tony Luck <tony.luck@xxxxxxxxx>
Signed-off-by: Ashok Raj <ashok.raj@xxxxxxxxx>
---
arch/x86/kernel/cpu/microcode/core.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c
index 17dba13d397d..a7d0cbbb2505 100644
--- a/arch/x86/kernel/cpu/microcode/core.c
+++ b/arch/x86/kernel/cpu/microcode/core.c
@@ -591,11 +591,11 @@ static int microcode_reload_late(void)
if (ret == 0)
microcode_check(&info);

- pr_info("Reload completed, microcode revision: 0x%x -> 0x%x\n",
- old, boot_cpu_data.microcode);
-
unregister_nmi_handler(NMI_LOCAL, "ucode_nmi");

+ if (!ret)
+ pr_info("Reload completed, microcode revision: 0x%x -> 0x%x\n",
+ old, boot_cpu_data.microcode);
done:
return ret;
}
--
2.34.1