aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/cryptd.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-05-01 11:15:36 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-05-01 11:15:36 -0400
commita0be7522b25f17ac2c3964a24b88b5fe7c9404b8 (patch)
treeaba2be9ce572e19d6dc65c56adaa3398a03578c4 /crypto/cryptd.c
parent3b2b74cad34e7a0cf6d4929ee9e8ad4e11a84867 (diff)
parentb1145ce395f7785487c128fe8faf8624e6586d84 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: [CRYPTO] cryptd: Correct kzalloc error test [CRYPTO] eseqiv: Fix off-by-one encryption [CRYPTO] api: Fix scatterwalk_sg_chain [CRYPTO] authenc: Fix async crypto crash in crypto_authenc_genicv()
Diffstat (limited to 'crypto/cryptd.c')
-rw-r--r--crypto/cryptd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/cryptd.c b/crypto/cryptd.c
index 250425263e00..b150de562057 100644
--- a/crypto/cryptd.c
+++ b/crypto/cryptd.c
@@ -190,8 +190,10 @@ static struct crypto_instance *cryptd_alloc_instance(struct crypto_alg *alg,
190 int err; 190 int err;
191 191
192 inst = kzalloc(sizeof(*inst) + sizeof(*ctx), GFP_KERNEL); 192 inst = kzalloc(sizeof(*inst) + sizeof(*ctx), GFP_KERNEL);
193 if (IS_ERR(inst)) 193 if (!inst) {
194 inst = ERR_PTR(-ENOMEM);
194 goto out; 195 goto out;
196 }
195 197
196 err = -ENAMETOOLONG; 198 err = -ENAMETOOLONG;
197 if (snprintf(inst->alg.cra_driver_name, CRYPTO_MAX_ALG_NAME, 199 if (snprintf(inst->alg.cra_driver_name, CRYPTO_MAX_ALG_NAME,