diff options
Diffstat (limited to 'drivers/crypto/talitos.c')
-rw-r--r-- | drivers/crypto/talitos.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 79fdba2a20c0..a81265bbb897 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c | |||
@@ -880,7 +880,7 @@ static int ipsec_esp(struct ipsec_esp_edesc *edesc, struct aead_request *areq, | |||
880 | unsigned int cryptlen = areq->cryptlen; | 880 | unsigned int cryptlen = areq->cryptlen; |
881 | unsigned int authsize = ctx->authsize; | 881 | unsigned int authsize = ctx->authsize; |
882 | unsigned int ivsize; | 882 | unsigned int ivsize; |
883 | int sg_count; | 883 | int sg_count, ret; |
884 | 884 | ||
885 | /* hmac key */ | 885 | /* hmac key */ |
886 | map_single_talitos_ptr(dev, &desc->ptr[0], ctx->authkeylen, &ctx->key, | 886 | map_single_talitos_ptr(dev, &desc->ptr[0], ctx->authkeylen, &ctx->key, |
@@ -984,7 +984,12 @@ static int ipsec_esp(struct ipsec_esp_edesc *edesc, struct aead_request *areq, | |||
984 | map_single_talitos_ptr(dev, &desc->ptr[6], ivsize, ctx->iv, 0, | 984 | map_single_talitos_ptr(dev, &desc->ptr[6], ivsize, ctx->iv, 0, |
985 | DMA_FROM_DEVICE); | 985 | DMA_FROM_DEVICE); |
986 | 986 | ||
987 | return talitos_submit(dev, desc, callback, areq); | 987 | ret = talitos_submit(dev, desc, callback, areq); |
988 | if (ret != -EINPROGRESS) { | ||
989 | ipsec_esp_unmap(dev, edesc, areq); | ||
990 | kfree(edesc); | ||
991 | } | ||
992 | return ret; | ||
988 | } | 993 | } |
989 | 994 | ||
990 | 995 | ||