Skip to content

Commit c07aded

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

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
static const struct crypto_cipher_ops cipher_ops;
1818

1919
/*
20-
* Checks if input API context is correct. If not, system break.
2120
* Returns the reference to the driver context
2221
*
2322
* @ctx Reference the API context pointer
@@ -92,7 +91,7 @@ static TEE_Result cipher_init(struct crypto_cipher_ctx *ctx,
9291
if (cipher->op && cipher->op->init) {
9392
/* Prepare the initialization data */
9493
dinit.ctx = cipher->ctx;
95-
dinit.encrypt = ((mode == TEE_MODE_ENCRYPT) ? true : false);
94+
dinit.encrypt = (mode == TEE_MODE_ENCRYPT);
9695
dinit.key1.data = (uint8_t *)key1;
9796
dinit.key1.length = key1_len;
9897
dinit.key2.data = (uint8_t *)key2;

core/drivers/crypto/crypto_api/include/drvcrypt_cipher.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ struct drvcrypt_cipher_update {
4646
* Crypto Library Cipher driver operations
4747
*/
4848
struct drvcrypt_cipher {
49-
/* Allocates of the Software context */
49+
/* Allocate of the Software context */
5050
TEE_Result (*alloc_ctx)(void **ctx, uint32_t algo);
5151
/* Free of the Software context */
5252
void (*free_ctx)(void *ctx);

0 commit comments

Comments
 (0)