Lines Matching refs:ret
22 TEE_Result ret = TEE_ERROR_GENERIC; in stm32mp15_read_uid() local
27 ret = stm32_bsec_find_otp_in_nvmem_layout("uid_otp", &otp_idx, &sz); in stm32mp15_read_uid()
28 if (ret) in stm32mp15_read_uid()
29 return ret; in stm32mp15_read_uid()
88 TEE_Result ret = TEE_ERROR_GENERIC; in aes_gcm_encrypt_uid() local
97 ret = stm32mp15_read_uid(uid); in aes_gcm_encrypt_uid()
98 if (ret) in aes_gcm_encrypt_uid()
101 ret = crypto_authenc_alloc_ctx(&ctx, TEE_ALG_AES_GCM); in aes_gcm_encrypt_uid()
102 if (ret) in aes_gcm_encrypt_uid()
105 ret = crypto_authenc_init(ctx, TEE_MODE_ENCRYPT, key, key_len, nonce, in aes_gcm_encrypt_uid()
107 if (ret) in aes_gcm_encrypt_uid()
110 ret = crypto_authenc_enc_final(ctx, (uint8_t *)uid, sizeof(uid), in aes_gcm_encrypt_uid()
112 if (ret) in aes_gcm_encrypt_uid()
119 if (ret) in aes_gcm_encrypt_uid()
122 return ret; in aes_gcm_encrypt_uid()
129 TEE_Result ret = TEE_SUCCESS; in tee_otp_get_hw_unique_key() local
138 ret = stm32mp15_read_otp(CFG_STM32MP15_HUK_BSEC_KEY_0, key++, &lock); in tee_otp_get_hw_unique_key()
139 if (ret) in tee_otp_get_hw_unique_key()
142 ret = stm32mp15_read_otp(CFG_STM32MP15_HUK_BSEC_KEY_1, key++, &lock); in tee_otp_get_hw_unique_key()
143 if (ret) in tee_otp_get_hw_unique_key()
146 ret = stm32mp15_read_otp(CFG_STM32MP15_HUK_BSEC_KEY_2, key++, &lock); in tee_otp_get_hw_unique_key()
147 if (ret) in tee_otp_get_hw_unique_key()
150 ret = stm32mp15_read_otp(CFG_STM32MP15_HUK_BSEC_KEY_3, key++, &lock); in tee_otp_get_hw_unique_key()
151 if (ret) in tee_otp_get_hw_unique_key()
157 ret = TEE_SUCCESS; in tee_otp_get_hw_unique_key()
162 ret = aes_gcm_encrypt_uid((uint8_t *)otp_key, len, hwkey->data, in tee_otp_get_hw_unique_key()
165 ret = TEE_ERROR_GENERIC; in tee_otp_get_hw_unique_key()
174 if (!ret && !stm32mp15_huk_init) { in tee_otp_get_hw_unique_key()
180 return ret; in tee_otp_get_hw_unique_key()