mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
efi/tpm: Fix sanity check of unsigned tbl_size being less than zero
Currently the check for tbl_size being less than zero is always false
because tbl_size is unsigned. Fix this by making it a signed int.
Addresses-Coverity: ("Unsigned compared against 0")
Signed-off-by: Colin Ian King <[email protected]>
Cc: Ard Biesheuvel <[email protected]>
Cc: Jerry Snitselaar <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Fixes: e658c82be5 ("efi/tpm: Only set 'efi_tpm_final_log_size' after successful event log parsing")
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
2ecb7402cf
commit
be59d57f98
1 changed files with 1 additions and 1 deletions
|
|
@ -40,7 +40,7 @@ int __init efi_tpm_eventlog_init(void)
|
|||
{
|
||||
struct linux_efi_tpm_eventlog *log_tbl;
|
||||
struct efi_tcg2_final_events_table *final_tbl;
|
||||
unsigned int tbl_size;
|
||||
int tbl_size;
|
||||
int ret = 0;
|
||||
|
||||
if (efi.tpm_log == EFI_INVALID_TABLE_ADDR) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue