diff options
author | Wei Yongjun <weiyj.lk@gmail.com> | 2016-08-20 10:48:53 +0000 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2016-08-24 21:04:49 +0800 |
commit | b46b9d1aadf7f31eb5c0bab20cd61e71011156cf (patch) | |
tree | 182cb8b6ed1354e4f2a7446f48aeb9c8fb327765 /drivers/crypto/sunxi-ss/sun4i-ss-hash.c | |
parent | 39457acda9139bb078d1b8f974651a194a397060 (diff) | |
download | talos-obmc-linux-b46b9d1aadf7f31eb5c0bab20cd61e71011156cf.tar.gz talos-obmc-linux-b46b9d1aadf7f31eb5c0bab20cd61e71011156cf.zip |
crypto: sun4i-ss - fix missing unlock on error in sun4i_hash()
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 <weiyj.lk@gmail.com>
Acked-by: Corentin LABBE <clabbe.montjoie@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/sunxi-ss/sun4i-ss-hash.c')
-rw-r--r-- | drivers/crypto/sunxi-ss/sun4i-ss-hash.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-hash.c b/drivers/crypto/sunxi-ss/sun4i-ss-hash.c index 2ee3b59d5ddf..1afeb8e5f709 100644 --- a/drivers/crypto/sunxi-ss/sun4i-ss-hash.c +++ b/drivers/crypto/sunxi-ss/sun4i-ss-hash.c @@ -245,7 +245,8 @@ int sun4i_hash(struct ahash_request *areq) 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 */ |