]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/crypto/ccp/ccp-crypto-sha.c
crypto: ccp - Cleanup hash invocation calls
[karo-tx-linux.git] / drivers / crypto / ccp / ccp-crypto-sha.c
index d30f6c893ffbbc8bc14677661558b72d477b44d5..3867290b353149fdcff8a0ddd5b5ab55e90fadee 100644 (file)
@@ -248,9 +248,13 @@ static int ccp_sha_finup(struct ahash_request *req)
 
 static int ccp_sha_digest(struct ahash_request *req)
 {
-       ccp_sha_init(req);
+       int ret;
 
-       return ccp_do_sha_update(req, req->nbytes, 1);
+       ret = ccp_sha_init(req);
+       if (ret)
+               return ret;
+
+       return ccp_sha_finup(req);
 }
 
 static int ccp_sha_setkey(struct crypto_ahash *tfm, const u8 *key,