mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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: cff9a17545 ("crypto: inside-secure - move cache result dma mapping to request")
Signed-off-by: Wei Yongjun <[email protected]>
Acked-by: Antoine Tenart <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
This commit is contained in:
parent
0108aab116
commit
efa94457e5
1 changed files with 3 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue