From: Lee Nipper Date: Thu, 17 Jul 2008 08:22:30 +0000 (+0800) Subject: crypto: talitos - Correct dst != src case handling X-Git-Tag: v2.6.27-rc1~59^2~4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=695ad589698571046d42a4450c2d801486905535;p=linux-2.6 crypto: talitos - Correct dst != src case handling Seems that dst == src, but this fixes the logic in case it's not. Signed-off-by: Lee Nipper Signed-off-by: Kim Phillips Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 01e6595014..f644fba35c 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c @@ -1022,7 +1022,7 @@ static struct ipsec_esp_edesc *ipsec_esp_edesc_alloc(struct aead_request *areq, dst_nents = src_nents; } else { dst_nents = sg_count(areq->dst, areq->cryptlen + ctx->authsize); - dst_nents = (dst_nents == 1) ? 0 : src_nents; + dst_nents = (dst_nents == 1) ? 0 : dst_nents; } /*