Commit 7d016156 authored by Borislav Petkov's avatar Borislav Petkov Committed by Thomas Gleixner

x86/microcode/intel: Merge two consecutive if-statements

Merge the two consecutive "if (ext_table_size)". No functional change.
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Link: http://lkml.kernel.org/r/1457345404-28884-4-git-send-email-bp@alien8.deSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent c0414622
...@@ -68,6 +68,9 @@ int microcode_sanity_check(void *mc, int print_err) ...@@ -68,6 +68,9 @@ int microcode_sanity_check(void *mc, int print_err)
} }
ext_table_size = total_size - (MC_HEADER_SIZE + data_size); ext_table_size = total_size - (MC_HEADER_SIZE + data_size);
if (ext_table_size) { if (ext_table_size) {
u32 ext_table_sum = 0;
u32 *ext_tablep;
if ((ext_table_size < EXT_HEADER_SIZE) if ((ext_table_size < EXT_HEADER_SIZE)
|| ((ext_table_size - EXT_HEADER_SIZE) % EXT_SIGNATURE_SIZE)) { || ((ext_table_size - EXT_HEADER_SIZE) % EXT_SIGNATURE_SIZE)) {
if (print_err) if (print_err)
...@@ -81,12 +84,9 @@ int microcode_sanity_check(void *mc, int print_err) ...@@ -81,12 +84,9 @@ int microcode_sanity_check(void *mc, int print_err)
return -EFAULT; return -EFAULT;
} }
ext_sigcount = ext_header->count; ext_sigcount = ext_header->count;
}
/* check extended table checksum */ /* check extended table checksum */
if (ext_table_size) { ext_tablep = (u32 *)ext_header;
u32 ext_table_sum = 0;
u32 *ext_tablep = (u32 *)ext_header;
i = ext_table_size / sizeof(u32); i = ext_table_size / sizeof(u32);
while (i--) while (i--)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment