Skip to content

Commit b9d0a85

Browse files
Yue HaibingJames Morris
Yue Haibing
authored and
James Morris
committed
tpm: Fix the type of the return value in calc_tpm2_event_size()
calc_tpm2_event_size() has an invalid signature because it returns a 'size_t' where as its signature says that it returns 'int'. Cc: <[email protected]> Fixes: 4d23cc3 ("tpm: add securityfs support for TPM 2.0 firmware event log") Suggested-by: Jarkko Sakkinen <[email protected]> Signed-off-by: Yue Haibing <[email protected]> Reviewed-by: Jarkko Sakkinen <[email protected]> Signed-off-by: Jarkko Sakkinen <[email protected]> Signed-off-by: James Morris <[email protected]>
1 parent c787192 commit b9d0a85

File tree

1 file changed

+2
-2
lines changed
  • drivers/char/tpm/eventlog

1 file changed

+2
-2
lines changed

drivers/char/tpm/eventlog/tpm2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
*
3838
* Returns size of the event. If it is an invalid event, returns 0.
3939
*/
40-
static int calc_tpm2_event_size(struct tcg_pcr_event2_head *event,
41-
struct tcg_pcr_event *event_header)
40+
static size_t calc_tpm2_event_size(struct tcg_pcr_event2_head *event,
41+
struct tcg_pcr_event *event_header)
4242
{
4343
struct tcg_efi_specid_event_head *efispecid;
4444
struct tcg_event_field *event_field;

0 commit comments

Comments
 (0)