diff options
-rw-r--r-- | crypto/cryptd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/cryptd.c b/crypto/cryptd.c index 250425263e0..b150de56205 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, |