lkml.org 
[lkml]   [2016]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/5] x86/microcode/intel: Merge two consecutive if-statements
Date
From: Borislav Petkov <bp@suse.de>

Merge the two consecutive "if (ext_table_size)".

No functionality change.

Signed-off-by: Borislav Petkov <bp@suse.de>
---
arch/x86/kernel/cpu/microcode/intel_lib.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/x86/kernel/cpu/microcode/intel_lib.c b/arch/x86/kernel/cpu/microcode/intel_lib.c
index 2b2d1354dc70..ffb1bbf45db0 100644
--- a/arch/x86/kernel/cpu/microcode/intel_lib.c
+++ b/arch/x86/kernel/cpu/microcode/intel_lib.c
@@ -68,6 +68,9 @@ int microcode_sanity_check(void *mc, int print_err)
}
ext_table_size = total_size - (MC_HEADER_SIZE + data_size);
if (ext_table_size) {
+ u32 ext_table_sum = 0;
+ u32 *ext_tablep;
+
if ((ext_table_size < EXT_HEADER_SIZE)
|| ((ext_table_size - EXT_HEADER_SIZE) % EXT_SIGNATURE_SIZE)) {
if (print_err)
@@ -81,12 +84,9 @@ int microcode_sanity_check(void *mc, int print_err)
return -EFAULT;
}
ext_sigcount = ext_header->count;
- }

- /* check extended table checksum */
- if (ext_table_size) {
- u32 ext_table_sum = 0;
- u32 *ext_tablep = (u32 *)ext_header;
+ /* check extended table checksum */
+ ext_tablep = (u32 *)ext_header;

i = ext_table_size / sizeof(u32);
while (i--)
--
2.3.5
\
 
 \ /
  Last update: 2016-03-07 11:41    [W:0.126 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site