Unverified Commit c2020692 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!14436 crypto: bcm - add error check in the ahash_hmac_init function

parents 0b8f0d9d 8a8e1fad
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2418,6 +2418,7 @@ static int ahash_hmac_setkey(struct crypto_ahash *ahash, const u8 *key,

static int ahash_hmac_init(struct ahash_request *req)
{
	int ret;
	struct iproc_reqctx_s *rctx = ahash_request_ctx(req);
	struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
	struct iproc_ctx_s *ctx = crypto_ahash_ctx(tfm);
@@ -2427,7 +2428,9 @@ static int ahash_hmac_init(struct ahash_request *req)
	flow_log("ahash_hmac_init()\n");

	/* init the context as a hash */
	ahash_init(req);
	ret = ahash_init(req);
	if (ret)
		return ret;

	if (!spu_no_incr_hash(ctx)) {
		/* SPU-M can do incr hashing but needs sw for outer HMAC */