Add the missing unlock before return from function sun4i_hash()
in the error handling case.
Fixes: 477d9b2e591b ("crypto: sun4i-ss - unify update/final function")
Signed-off-by: Wei Yongjun <[email protected]>
Acked-by: Corentin LABBE <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
if (end > areq->nbytes || areq->nbytes - end > 63) {
dev_err(ss->dev, "ERROR: Bound error %u %u\n",
end, areq->nbytes);
- return -EINVAL;
+ err = -EINVAL;
+ goto release_ss;
}
} else {
/* Since we have the flag final, we can go up to modulo 4 */