1 From cb6842dac159b40acdc755526b0ba0afb61d9d64 Mon Sep 17 00:00:00 2001
2 From: Cristian Stoica <cristian.stoica@nxp.com>
3 Date: Mon, 14 Dec 2015 14:02:00 +0200
4 Subject: [PATCH 24/48] cryptodev: clarify code, remove assignments from
7 Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com>
9 crypto/engine/eng_cryptodev.c | 6 ++++--
10 1 file changed, 4 insertions(+), 2 deletions(-)
12 diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c
13 index 1910c89..fcfd232 100644
14 --- a/crypto/engine/eng_cryptodev.c
15 +++ b/crypto/engine/eng_cryptodev.c
16 @@ -1559,14 +1559,16 @@ static int cryptodev_digest_init(EVP_MD_CTX *ctx)
17 struct session_op *sess = &state->d_sess;
20 - if ((digest = digest_nid_to_cryptodev(ctx->digest->type)) == NID_undef) {
21 + digest = digest_nid_to_cryptodev(ctx->digest->type);
22 + if (digest == NID_undef) {
23 printf("cryptodev_digest_init: Can't get digest \n");
27 memset(state, 0, sizeof(struct dev_crypto_state));
29 - if ((state->d_fd = get_dev_crypto()) < 0) {
30 + state->d_fd = get_dev_crypto();
31 + if (state->d_fd < 0) {
32 printf("cryptodev_digest_init: Can't get Dev \n");