@@ -197,7 +197,7 @@ int tpm2_pcr_read(struct tpm_chip *chip, u32 pcr_idx, u8 *res_buf)
197197 tpm_buf_append (& buf , (const unsigned char * )pcr_select ,
198198 sizeof (pcr_select ));
199199
200- rc = tpm_transmit_cmd (chip , NULL , & buf , 0 , 0 , res_buf ?
200+ rc = tpm_transmit_cmd (chip , & buf , 0 , 0 , res_buf ?
201201 "attempting to read a pcr value" : NULL );
202202 if (rc == 0 && res_buf ) {
203203 out = (struct tpm2_pcr_read_out * )& buf .data [TPM_HEADER_SIZE ];
@@ -264,7 +264,7 @@ int tpm2_pcr_extend(struct tpm_chip *chip, u32 pcr_idx, u32 count,
264264 }
265265 }
266266
267- rc = tpm_transmit_cmd (chip , NULL , & buf , 0 , 0 ,
267+ rc = tpm_transmit_cmd (chip , & buf , 0 , 0 ,
268268 "attempting extend a PCR value" );
269269
270270 tpm_buf_destroy (& buf );
@@ -309,7 +309,7 @@ int tpm2_get_random(struct tpm_chip *chip, u8 *dest, size_t max)
309309 do {
310310 tpm_buf_reset (& buf , TPM2_ST_NO_SESSIONS , TPM2_CC_GET_RANDOM );
311311 tpm_buf_append_u16 (& buf , num_bytes );
312- err = tpm_transmit_cmd (chip , NULL , & buf ,
312+ err = tpm_transmit_cmd (chip , & buf ,
313313 offsetof(struct tpm2_get_random_out ,
314314 buffer ),
315315 0 , "attempting get random" );
@@ -362,7 +362,7 @@ void tpm2_flush_context_cmd(struct tpm_chip *chip, u32 handle,
362362
363363 tpm_buf_append_u32 (& buf , handle );
364364
365- tpm_transmit_cmd (chip , NULL , & buf , 0 , flags , "flushing context" );
365+ tpm_transmit_cmd (chip , & buf , 0 , flags , "flushing context" );
366366 tpm_buf_destroy (& buf );
367367}
368368
@@ -476,7 +476,7 @@ int tpm2_seal_trusted(struct tpm_chip *chip,
476476 goto out ;
477477 }
478478
479- rc = tpm_transmit_cmd (chip , NULL , & buf , 4 , 0 , "sealing data" );
479+ rc = tpm_transmit_cmd (chip , & buf , 4 , 0 , "sealing data" );
480480 if (rc )
481481 goto out ;
482482
@@ -558,7 +558,7 @@ static int tpm2_load_cmd(struct tpm_chip *chip,
558558 goto out ;
559559 }
560560
561- rc = tpm_transmit_cmd (chip , NULL , & buf , 4 , flags , "loading blob" );
561+ rc = tpm_transmit_cmd (chip , & buf , 4 , flags , "loading blob" );
562562 if (!rc )
563563 * blob_handle = be32_to_cpup (
564564 (__be32 * ) & buf .data [TPM_HEADER_SIZE ]);
@@ -608,7 +608,7 @@ static int tpm2_unseal_cmd(struct tpm_chip *chip,
608608 options -> blobauth /* hmac */ ,
609609 TPM_DIGEST_SIZE );
610610
611- rc = tpm_transmit_cmd (chip , NULL , & buf , 6 , flags , "unsealing" );
611+ rc = tpm_transmit_cmd (chip , & buf , 6 , flags , "unsealing" );
612612 if (rc > 0 )
613613 rc = - EPERM ;
614614
@@ -698,7 +698,7 @@ ssize_t tpm2_get_tpm_pt(struct tpm_chip *chip, u32 property_id, u32 *value,
698698 tpm_buf_append_u32 (& buf , TPM2_CAP_TPM_PROPERTIES );
699699 tpm_buf_append_u32 (& buf , property_id );
700700 tpm_buf_append_u32 (& buf , 1 );
701- rc = tpm_transmit_cmd (chip , NULL , & buf , 0 , 0 , NULL );
701+ rc = tpm_transmit_cmd (chip , & buf , 0 , 0 , NULL );
702702 if (!rc ) {
703703 out = (struct tpm2_get_cap_out * )
704704 & buf .data [TPM_HEADER_SIZE ];
@@ -728,7 +728,7 @@ void tpm2_shutdown(struct tpm_chip *chip, u16 shutdown_type)
728728 if (rc )
729729 return ;
730730 tpm_buf_append_u16 (& buf , shutdown_type );
731- tpm_transmit_cmd (chip , NULL , & buf , 0 , 0 , "stopping the TPM" );
731+ tpm_transmit_cmd (chip , & buf , 0 , 0 , "stopping the TPM" );
732732 tpm_buf_destroy (& buf );
733733}
734734
@@ -757,7 +757,7 @@ static int tpm2_do_selftest(struct tpm_chip *chip)
757757 return rc ;
758758
759759 tpm_buf_append_u8 (& buf , full );
760- rc = tpm_transmit_cmd (chip , NULL , & buf , 0 , 0 ,
760+ rc = tpm_transmit_cmd (chip , & buf , 0 , 0 ,
761761 "attempting the self test" );
762762 tpm_buf_destroy (& buf );
763763
@@ -794,7 +794,7 @@ int tpm2_probe(struct tpm_chip *chip)
794794 tpm_buf_append_u32 (& buf , TPM2_CAP_TPM_PROPERTIES );
795795 tpm_buf_append_u32 (& buf , TPM_PT_TOTAL_COMMANDS );
796796 tpm_buf_append_u32 (& buf , 1 );
797- rc = tpm_transmit_cmd (chip , NULL , & buf , 0 , 0 , NULL );
797+ rc = tpm_transmit_cmd (chip , & buf , 0 , 0 , NULL );
798798 /* We ignore TPM return codes on purpose. */
799799 if (rc >= 0 ) {
800800 out = (struct tpm_header * )buf .data ;
@@ -833,8 +833,7 @@ static ssize_t tpm2_get_pcr_allocation(struct tpm_chip *chip)
833833 tpm_buf_append_u32 (& buf , 0 );
834834 tpm_buf_append_u32 (& buf , 1 );
835835
836- rc = tpm_transmit_cmd (chip , NULL , & buf , 9 , 0 ,
837- "get tpm pcr allocation" );
836+ rc = tpm_transmit_cmd (chip , & buf , 9 , 0 , "get tpm pcr allocation" );
838837 if (rc )
839838 goto out ;
840839
@@ -905,7 +904,7 @@ static int tpm2_get_cc_attrs_tbl(struct tpm_chip *chip)
905904 tpm_buf_append_u32 (& buf , TPM2_CC_FIRST );
906905 tpm_buf_append_u32 (& buf , nr_commands );
907906
908- rc = tpm_transmit_cmd (chip , NULL , & buf , 9 + 4 * nr_commands , 0 , NULL );
907+ rc = tpm_transmit_cmd (chip , & buf , 9 + 4 * nr_commands , 0 , NULL );
909908 if (rc ) {
910909 tpm_buf_destroy (& buf );
911910 goto out ;
@@ -962,8 +961,7 @@ static int tpm2_startup(struct tpm_chip *chip)
962961 return rc ;
963962
964963 tpm_buf_append_u16 (& buf , TPM2_SU_CLEAR );
965- rc = tpm_transmit_cmd (chip , NULL , & buf , 0 , 0 ,
966- "attempting to start the TPM" );
964+ rc = tpm_transmit_cmd (chip , & buf , 0 , 0 , "attempting to start the TPM" );
967965 tpm_buf_destroy (& buf );
968966
969967 return rc ;
0 commit comments