Skip to content

Commit a1892ca

Browse files
committed
[Review OP-TEE#4] core: driver: generic resources for crypto device driver
Minor fixes. Signed-off-by: Clement Faure <clement.faure@nxp.com>
1 parent 97b2a6b commit a1892ca

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

core/crypto/crypto.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ TEE_Result crypto_cipher_alloc_ctx(void **ctx, uint32_t algo)
9999
struct crypto_cipher_ctx *c = NULL;
100100

101101
/*
102-
* Use default cryptographic implement if no matching
102+
* Use default cryptographic implementation if no matching
103103
* drvcrypt device.
104104
*/
105105
res = drvcrypt_cipher_alloc_ctx(&c, algo);

core/drivers/crypto/crypto_api/cipher/cipher.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ static TEE_Result cipher_init(struct crypto_cipher_ctx *ctx,
7878
{
7979
TEE_Result ret = TEE_ERROR_NOT_IMPLEMENTED;
8080
struct crypto_cipher *cipher = to_cipher_ctx(ctx);
81-
struct drvcrypt_cipher_init dinit = {};
81+
struct drvcrypt_cipher_init dinit = { };
8282

8383
if ((!key1 && key1_len) || (!key2 && key2_len) || (!iv && iv_len)) {
8484
CRYPTO_TRACE("One of the key is not correct");
@@ -113,14 +113,14 @@ static TEE_Result cipher_init(struct crypto_cipher_ctx *ctx,
113113
* @last_block True if last block to handle
114114
* @data Data to encrypt/decrypt
115115
* @len Length of the input data and output result
116-
* @dst [out] Result block of the operation
116+
* @dst [out] Output data of the operation
117117
*/
118118
static TEE_Result cipher_update(struct crypto_cipher_ctx *ctx, bool last_block,
119119
const uint8_t *data, size_t len, uint8_t *dst)
120120
{
121121
TEE_Result ret = TEE_ERROR_NOT_IMPLEMENTED;
122122
struct crypto_cipher *cipher = to_cipher_ctx(ctx);
123-
struct drvcrypt_cipher_update dupdate = {};
123+
struct drvcrypt_cipher_update dupdate = { };
124124

125125
if (!dst) {
126126
CRYPTO_TRACE("Destination buffer error");

0 commit comments

Comments
 (0)