Commit 946dca8f authored by Herbert Xu's avatar Herbert Xu

Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

Merge crypto tree to pick up crypto stats API revert.
parents 7a027b57 e61efff4
...@@ -140,9 +140,8 @@ static int crypto_cbc_create(struct crypto_template *tmpl, struct rtattr **tb) ...@@ -140,9 +140,8 @@ static int crypto_cbc_create(struct crypto_template *tmpl, struct rtattr **tb)
spawn = skcipher_instance_ctx(inst); spawn = skcipher_instance_ctx(inst);
err = crypto_init_spawn(spawn, alg, skcipher_crypto_instance(inst), err = crypto_init_spawn(spawn, alg, skcipher_crypto_instance(inst),
CRYPTO_ALG_TYPE_MASK); CRYPTO_ALG_TYPE_MASK);
crypto_mod_put(alg);
if (err) if (err)
goto err_free_inst; goto err_put_alg;
err = crypto_inst_setname(skcipher_crypto_instance(inst), "cbc", alg); err = crypto_inst_setname(skcipher_crypto_instance(inst), "cbc", alg);
if (err) if (err)
...@@ -174,12 +173,15 @@ static int crypto_cbc_create(struct crypto_template *tmpl, struct rtattr **tb) ...@@ -174,12 +173,15 @@ static int crypto_cbc_create(struct crypto_template *tmpl, struct rtattr **tb)
err = skcipher_register_instance(tmpl, inst); err = skcipher_register_instance(tmpl, inst);
if (err) if (err)
goto err_drop_spawn; goto err_drop_spawn;
crypto_mod_put(alg);
out: out:
return err; return err;
err_drop_spawn: err_drop_spawn:
crypto_drop_spawn(spawn); crypto_drop_spawn(spawn);
err_put_alg:
crypto_mod_put(alg);
err_free_inst: err_free_inst:
kfree(inst); kfree(inst);
goto out; goto out;
......
...@@ -286,9 +286,8 @@ static int crypto_cfb_create(struct crypto_template *tmpl, struct rtattr **tb) ...@@ -286,9 +286,8 @@ static int crypto_cfb_create(struct crypto_template *tmpl, struct rtattr **tb)
spawn = skcipher_instance_ctx(inst); spawn = skcipher_instance_ctx(inst);
err = crypto_init_spawn(spawn, alg, skcipher_crypto_instance(inst), err = crypto_init_spawn(spawn, alg, skcipher_crypto_instance(inst),
CRYPTO_ALG_TYPE_MASK); CRYPTO_ALG_TYPE_MASK);
crypto_mod_put(alg);
if (err) if (err)
goto err_free_inst; goto err_put_alg;
err = crypto_inst_setname(skcipher_crypto_instance(inst), "cfb", alg); err = crypto_inst_setname(skcipher_crypto_instance(inst), "cfb", alg);
if (err) if (err)
...@@ -317,12 +316,15 @@ static int crypto_cfb_create(struct crypto_template *tmpl, struct rtattr **tb) ...@@ -317,12 +316,15 @@ static int crypto_cfb_create(struct crypto_template *tmpl, struct rtattr **tb)
err = skcipher_register_instance(tmpl, inst); err = skcipher_register_instance(tmpl, inst);
if (err) if (err)
goto err_drop_spawn; goto err_drop_spawn;
crypto_mod_put(alg);
out: out:
return err; return err;
err_drop_spawn: err_drop_spawn:
crypto_drop_spawn(spawn); crypto_drop_spawn(spawn);
err_put_alg:
crypto_mod_put(alg);
err_free_inst: err_free_inst:
kfree(inst); kfree(inst);
goto out; goto out;
......
...@@ -244,9 +244,8 @@ static int crypto_pcbc_create(struct crypto_template *tmpl, struct rtattr **tb) ...@@ -244,9 +244,8 @@ static int crypto_pcbc_create(struct crypto_template *tmpl, struct rtattr **tb)
spawn = skcipher_instance_ctx(inst); spawn = skcipher_instance_ctx(inst);
err = crypto_init_spawn(spawn, alg, skcipher_crypto_instance(inst), err = crypto_init_spawn(spawn, alg, skcipher_crypto_instance(inst),
CRYPTO_ALG_TYPE_MASK); CRYPTO_ALG_TYPE_MASK);
crypto_mod_put(alg);
if (err) if (err)
goto err_free_inst; goto err_put_alg;
err = crypto_inst_setname(skcipher_crypto_instance(inst), "pcbc", alg); err = crypto_inst_setname(skcipher_crypto_instance(inst), "pcbc", alg);
if (err) if (err)
...@@ -275,12 +274,15 @@ static int crypto_pcbc_create(struct crypto_template *tmpl, struct rtattr **tb) ...@@ -275,12 +274,15 @@ static int crypto_pcbc_create(struct crypto_template *tmpl, struct rtattr **tb)
err = skcipher_register_instance(tmpl, inst); err = skcipher_register_instance(tmpl, inst);
if (err) if (err)
goto err_drop_spawn; goto err_drop_spawn;
crypto_mod_put(alg);
out: out:
return err; return err;
err_drop_spawn: err_drop_spawn:
crypto_drop_spawn(spawn); crypto_drop_spawn(spawn);
err_put_alg:
crypto_mod_put(alg);
err_free_inst: err_free_inst:
kfree(inst); kfree(inst);
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment