summaryrefslogtreecommitdiff
path: root/arch/s390/crypto/paes_s390.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-04-02 10:33:48 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2017-04-02 10:33:48 -0400
commitbee3f412d6fc94011850f16cddce745d529411a5 (patch)
tree01b1823a3bc0cb760129ed15f7ec027a36edc48b /arch/s390/crypto/paes_s390.c
parentd597580d373774b1bdab84b3d26ff0b55162b916 (diff)
parent476e75a44b56038bee9207242d4bc718f6b4de06 (diff)
Merge branch 'parisc-4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux into uaccess.parisc
Diffstat (limited to 'arch/s390/crypto/paes_s390.c')
-rw-r--r--arch/s390/crypto/paes_s390.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/s390/crypto/paes_s390.c b/arch/s390/crypto/paes_s390.c
index d69ea495c4d7..716b17238599 100644
--- a/arch/s390/crypto/paes_s390.c
+++ b/arch/s390/crypto/paes_s390.c
@@ -474,8 +474,11 @@ static int ctr_paes_crypt(struct blkcipher_desc *desc, unsigned long modifier,
ret = blkcipher_walk_done(desc, walk, nbytes - n);
}
if (k < n) {
- if (__ctr_paes_set_key(ctx) != 0)
+ if (__ctr_paes_set_key(ctx) != 0) {
+ if (locked)
+ spin_unlock(&ctrblk_lock);
return blkcipher_walk_done(desc, walk, -EIO);
+ }
}
}
if (locked)