x86, microcode: remove an unneeded NULL check
Borislav Petkov
AppliedQuoted 9 lines · Dan Carpenter
"uci" is an element of the ucode_cpu_info[] array, it can't be NULL.
Signed-off-by Dan Carpenter <[email protected]>arch/x86/kernel/cpu/microcode/core.c +0
-0
arch/x86/kernel/cpu/microcode/core.c static enum ucode_state microcode_init_cpu(int cpu, bool refresh_fw) · line 388
Quoted 8 lines
arch/x86/kernel/cpu/microcode/core.c +1
-1@@ -382,7 +382,7 @@ static enum ucode_state microcode_init_cpu(int cpu, bool refresh_fw)enum ucode_state ustate;struct ucode_cpu_info *uci = ucode_cpu_info + cpu; -if (uci && uci->valid) +if (uci->valid)return UCODE_OK ;if (collect_cpu_info (cpu))
Applied, after almost 2 years!
Thanks.
Signature · 5 lines
Regards/Gruss,
Boris.
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
--