All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [patch] x86, microcode: remove an unneeded NULL check
@ 2016-01-22 13:00 Borislav Petkov
  0 siblings, 0 replies; 2+ messages in thread
From: Borislav Petkov @ 2016-01-22 13:00 UTC (permalink / raw)
  To: kernel-janitors

On Mon, Jan 20, 2014 at 01:30:47PM +0300, Dan Carpenter wrote:
> "uci" is an element of the ucode_cpu_info[] array, it can't be NULL.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c
> index 15c987698b0f..05db44e4198c 100644
> --- a/arch/x86/kernel/cpu/microcode/core.c
> +++ b/arch/x86/kernel/cpu/microcode/core.c
> @@ -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.

-- 
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [patch] x86, microcode: remove an unneeded NULL check
@ 2014-01-20 10:30 Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2014-01-20 10:30 UTC (permalink / raw)
  To: kernel-janitors

"uci" is an element of the ucode_cpu_info[] array, it can't be NULL.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c
index 15c987698b0f..05db44e4198c 100644
--- a/arch/x86/kernel/cpu/microcode/core.c
+++ b/arch/x86/kernel/cpu/microcode/core.c
@@ -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))

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-22 13:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-22 13:00 [patch] x86, microcode: remove an unneeded NULL check Borislav Petkov
  -- strict thread matches above, loose matches on Subject: below --
2014-01-20 10:30 Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.