aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2018-12-07 00:59:10 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2018-12-07 00:59:10 -0500
commit946dca8fe456564373e0ff1f40c232b534e2aaef (patch)
treeb72d6bbdd31fe6b485e32a8bb56a8320aefb4737 /crypto
parent7a027b57f959660547779b6290a3b50ff1601980 (diff)
parente61efff4ae94f4509707a5e03f8edb6455f490e1 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Merge crypto tree to pick up crypto stats API revert.
Diffstat (limited to 'crypto')
-rw-r--r--crypto/cbc.c6
-rw-r--r--crypto/cfb.c6
-rw-r--r--crypto/pcbc.c6
3 files changed, 12 insertions, 6 deletions
diff --git a/crypto/cbc.c b/crypto/cbc.c
index b761b1f9c6ca..dd5f332fd566 100644
--- a/crypto/cbc.c
+++ b/crypto/cbc.c
@@ -140,9 +140,8 @@ static int crypto_cbc_create(struct crypto_template *tmpl, struct rtattr **tb)
140 spawn = skcipher_instance_ctx(inst); 140 spawn = skcipher_instance_ctx(inst);
141 err = crypto_init_spawn(spawn, alg, skcipher_crypto_instance(inst), 141 err = crypto_init_spawn(spawn, alg, skcipher_crypto_instance(inst),
142 CRYPTO_ALG_TYPE_MASK); 142 CRYPTO_ALG_TYPE_MASK);
143 crypto_mod_put(alg);
144 if (err) 143 if (err)
145 goto err_free_inst; 144 goto err_put_alg;
146 145
147 err = crypto_inst_setname(skcipher_crypto_instance(inst), "cbc", alg); 146 err = crypto_inst_setname(skcipher_crypto_instance(inst), "cbc", alg);
148 if (err) 147 if (err)
@@ -174,12 +173,15 @@ static int crypto_cbc_create(struct crypto_template *tmpl, struct rtattr **tb)
174 err = skcipher_register_instance(tmpl, inst); 173 err = skcipher_register_instance(tmpl, inst);
175 if (err) 174 if (err)
176 goto err_drop_spawn; 175 goto err_drop_spawn;
176 crypto_mod_put(alg);
177 177
178out: 178out:
179 return err; 179 return err;
180 180
181err_drop_spawn: 181err_drop_spawn:
182 crypto_drop_spawn(spawn); 182 crypto_drop_spawn(spawn);
183err_put_alg:
184 crypto_mod_put(alg);
183err_free_inst: 185err_free_inst:
184 kfree(inst); 186 kfree(inst);
185 goto out; 187 goto out;
diff --git a/crypto/cfb.c b/crypto/cfb.c
index fd4e8500e121..e81e45673498 100644
--- a/crypto/cfb.c
+++ b/crypto/cfb.c
@@ -286,9 +286,8 @@ static int crypto_cfb_create(struct crypto_template *tmpl, struct rtattr **tb)
286 spawn = skcipher_instance_ctx(inst); 286 spawn = skcipher_instance_ctx(inst);
287 err = crypto_init_spawn(spawn, alg, skcipher_crypto_instance(inst), 287 err = crypto_init_spawn(spawn, alg, skcipher_crypto_instance(inst),
288 CRYPTO_ALG_TYPE_MASK); 288 CRYPTO_ALG_TYPE_MASK);
289 crypto_mod_put(alg);
290 if (err) 289 if (err)
291 goto err_free_inst; 290 goto err_put_alg;
292 291
293 err = crypto_inst_setname(skcipher_crypto_instance(inst), "cfb", alg); 292 err = crypto_inst_setname(skcipher_crypto_instance(inst), "cfb", alg);
294 if (err) 293 if (err)
@@ -317,12 +316,15 @@ static int crypto_cfb_create(struct crypto_template *tmpl, struct rtattr **tb)
317 err = skcipher_register_instance(tmpl, inst); 316 err = skcipher_register_instance(tmpl, inst);
318 if (err) 317 if (err)
319 goto err_drop_spawn; 318 goto err_drop_spawn;
319 crypto_mod_put(alg);
320 320
321out: 321out:
322 return err; 322 return err;
323 323
324err_drop_spawn: 324err_drop_spawn:
325 crypto_drop_spawn(spawn); 325 crypto_drop_spawn(spawn);
326err_put_alg:
327 crypto_mod_put(alg);
326err_free_inst: 328err_free_inst:
327 kfree(inst); 329 kfree(inst);
328 goto out; 330 goto out;
diff --git a/crypto/pcbc.c b/crypto/pcbc.c
index ef802f6e9642..8aa10144407c 100644
--- a/crypto/pcbc.c
+++ b/crypto/pcbc.c
@@ -244,9 +244,8 @@ static int crypto_pcbc_create(struct crypto_template *tmpl, struct rtattr **tb)
244 spawn = skcipher_instance_ctx(inst); 244 spawn = skcipher_instance_ctx(inst);
245 err = crypto_init_spawn(spawn, alg, skcipher_crypto_instance(inst), 245 err = crypto_init_spawn(spawn, alg, skcipher_crypto_instance(inst),
246 CRYPTO_ALG_TYPE_MASK); 246 CRYPTO_ALG_TYPE_MASK);
247 crypto_mod_put(alg);
248 if (err) 247 if (err)
249 goto err_free_inst; 248 goto err_put_alg;
250 249
251 err = crypto_inst_setname(skcipher_crypto_instance(inst), "pcbc", alg); 250 err = crypto_inst_setname(skcipher_crypto_instance(inst), "pcbc", alg);
252 if (err) 251 if (err)
@@ -275,12 +274,15 @@ static int crypto_pcbc_create(struct crypto_template *tmpl, struct rtattr **tb)
275 err = skcipher_register_instance(tmpl, inst); 274 err = skcipher_register_instance(tmpl, inst);
276 if (err) 275 if (err)
277 goto err_drop_spawn; 276 goto err_drop_spawn;
277 crypto_mod_put(alg);
278 278
279out: 279out:
280 return err; 280 return err;
281 281
282err_drop_spawn: 282err_drop_spawn:
283 crypto_drop_spawn(spawn); 283 crypto_drop_spawn(spawn);
284err_put_alg:
285 crypto_mod_put(alg);
284err_free_inst: 286err_free_inst:
285 kfree(inst); 287 kfree(inst);
286 goto out; 288 goto out;