Skip to content

Commit

Permalink
x86/microcode/intel: Merge two consecutive if-statements
Browse files Browse the repository at this point in the history
Merge the two consecutive "if (ext_table_size)". No functional change.

Signed-off-by: Borislav Petkov <bp@suse.de>
Link: http://lkml.kernel.org/r/1457345404-28884-4-git-send-email-bp@alien8.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Borislav Petkov authored and Thomas Gleixner committed Mar 8, 2016
1 parent c041462 commit 7d01615
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions arch/x86/kernel/cpu/microcode/intel_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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--)
Expand Down

0 comments on commit 7d01615

Please sign in to comment.