Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit efa94457 authored by weiyongjun \(A\)'s avatar weiyongjun \(A\) Committed by Herbert Xu
Browse files

crypto: inside-secure - fix missing unlock on error in safexcel_ahash_send_req()



Add the missing unlock before return from function
safexcel_ahash_send_req() in the error handling case.

Fixes: cff9a175 ("crypto: inside-secure - move cache result dma mapping to request")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Acked-by: default avatarAntoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 0108aab1
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -236,8 +236,10 @@ static int safexcel_ahash_send_req(struct crypto_async_request *async, int ring,
	if (cache_len) {
		req->cache_dma = dma_map_single(priv->dev, req->cache,
						cache_len, DMA_TO_DEVICE);
		if (dma_mapping_error(priv->dev, req->cache_dma))
		if (dma_mapping_error(priv->dev, req->cache_dma)) {
			spin_unlock_bh(&priv->ring[ring].egress_lock);
			return -EINVAL;
		}

		req->cache_sz = cache_len;
		first_cdesc = safexcel_add_cdesc(priv, ring, 1,