]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - crypto/authenc.c
[SCSI] fix pcmcia compile problem
[linux-2.6-omap-h63xx.git] / crypto / authenc.c
index 86b3ac88eab7e683bc70bcaca19ec83b36c268d8..126a529b496d5df32959499ff22739767eca52a3 100644 (file)
@@ -84,8 +84,8 @@ static int crypto_authenc_hash(struct aead_request *req)
                .tfm = auth,
        };
        u8 *hash = aead_request_ctx(req);
-       struct scatterlist *dst;
-       unsigned int cryptlen;
+       struct scatterlist *dst = req->dst;
+       unsigned int cryptlen = req->cryptlen;
        int err;
 
        hash = (u8 *)ALIGN((unsigned long)hash + crypto_hash_alignmask(auth), 
@@ -100,8 +100,6 @@ static int crypto_authenc_hash(struct aead_request *req)
        if (err)
                goto auth_unlock;
 
-       cryptlen = req->cryptlen;
-       dst = req->dst;
        err = crypto_hash_update(&desc, dst, cryptlen);
        if (err)
                goto auth_unlock;
@@ -159,8 +157,8 @@ static int crypto_authenc_verify(struct aead_request *req)
        };
        u8 *ohash = aead_request_ctx(req);
        u8 *ihash;
-       struct scatterlist *src;
-       unsigned int cryptlen;
+       struct scatterlist *src = req->src;
+       unsigned int cryptlen = req->cryptlen;
        unsigned int authsize;
        int err;
 
@@ -177,8 +175,6 @@ static int crypto_authenc_verify(struct aead_request *req)
        if (err)
                goto auth_unlock;
 
-       cryptlen = req->cryptlen;
-       src = req->src;
        err = crypto_hash_update(&desc, src, cryptlen);
        if (err)
                goto auth_unlock;
@@ -312,12 +308,12 @@ static struct crypto_instance *crypto_authenc_alloc(struct rtattr **tb)
 
        err = -ENAMETOOLONG;
        if (snprintf(inst->alg.cra_name, CRYPTO_MAX_ALG_NAME,
-                    "authenc(%s, %u, %s, %u)", auth->cra_name, authsize,
+                    "authenc(%s,%u,%s,%u)", auth->cra_name, authsize,
                     enc->cra_name, enckeylen) >= CRYPTO_MAX_ALG_NAME)
                goto err_free_inst;
 
        if (snprintf(inst->alg.cra_driver_name, CRYPTO_MAX_ALG_NAME,
-                    "authenc(%s, %u, %s, %u)", auth->cra_driver_name,
+                    "authenc(%s,%u,%s,%u)", auth->cra_driver_name,
                     authsize, enc->cra_driver_name, enckeylen) >=
            CRYPTO_MAX_ALG_NAME)
                goto err_free_inst;