]> err.no Git - linux-2.6/blobdiff - drivers/crypto/talitos.c
crypto: talitos - Correct dst != src case handling
[linux-2.6] / drivers / crypto / talitos.c
index 01e6595014eefc4a9f98bcd4a8fef42ee7c34cba..f644fba35c8cc21fc95d521fc9c5e76e36ec69b6 100644 (file)
@@ -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;
        }
 
        /*