Commit e6cc5b8d authored by Markus Elfring's avatar Markus Elfring Committed by Herbert Xu

crypto: caam - Return a value directly in caam_hash_cra_init()

* Return a value at the end without storing it in an intermediate variable.

* Delete the local variable "ret" which became unnecessary with
  this refactoring.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 58b0e5d0
...@@ -1846,7 +1846,6 @@ static int caam_hash_cra_init(struct crypto_tfm *tfm) ...@@ -1846,7 +1846,6 @@ static int caam_hash_cra_init(struct crypto_tfm *tfm)
HASH_MSG_LEN + SHA256_DIGEST_SIZE, HASH_MSG_LEN + SHA256_DIGEST_SIZE,
HASH_MSG_LEN + 64, HASH_MSG_LEN + 64,
HASH_MSG_LEN + SHA512_DIGEST_SIZE }; HASH_MSG_LEN + SHA512_DIGEST_SIZE };
int ret = 0;
/* /*
* Get a Job ring from Job Ring driver to ensure in-order * Get a Job ring from Job Ring driver to ensure in-order
...@@ -1866,10 +1865,7 @@ static int caam_hash_cra_init(struct crypto_tfm *tfm) ...@@ -1866,10 +1865,7 @@ static int caam_hash_cra_init(struct crypto_tfm *tfm)
crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm), crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm),
sizeof(struct caam_hash_state)); sizeof(struct caam_hash_state));
return ahash_set_sh_desc(ahash);
ret = ahash_set_sh_desc(ahash);
return ret;
} }
static void caam_hash_cra_exit(struct crypto_tfm *tfm) static void caam_hash_cra_exit(struct crypto_tfm *tfm)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment