summaryrefslogtreecommitdiffstats
path: root/crypto/pcbc.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-10 09:22:34 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-10 09:22:34 +0100
commitc4aa8b2a8b63a269d63acafc0358a7b9f5d9e563 (patch)
treed04a7861e542665bb7c03aac729a72c957be8abc /crypto/pcbc.c
parent48d365de7746a000afd7f9f7cc1821cbb6fe9b45 (diff)
parent40e020c129cfc991e8ab4736d2665351ffd1468d (diff)
downloadblackbird-op-linux-c4aa8b2a8b63a269d63acafc0358a7b9f5d9e563.tar.gz
blackbird-op-linux-c4aa8b2a8b63a269d63acafc0358a7b9f5d9e563.zip
Merge 4.20-rc6 into char-misc-next
This should resolve the hv driver merge conflict. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'crypto/pcbc.c')
-rw-r--r--crypto/pcbc.c6
1 files changed, 4 insertions, 2 deletions
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)
spawn = skcipher_instance_ctx(inst);
err = crypto_init_spawn(spawn, alg, skcipher_crypto_instance(inst),
CRYPTO_ALG_TYPE_MASK);
- crypto_mod_put(alg);
if (err)
- goto err_free_inst;
+ goto err_put_alg;
err = crypto_inst_setname(skcipher_crypto_instance(inst), "pcbc", alg);
if (err)
@@ -275,12 +274,15 @@ static int crypto_pcbc_create(struct crypto_template *tmpl, struct rtattr **tb)
err = skcipher_register_instance(tmpl, inst);
if (err)
goto err_drop_spawn;
+ crypto_mod_put(alg);
out:
return err;
err_drop_spawn:
crypto_drop_spawn(spawn);
+err_put_alg:
+ crypto_mod_put(alg);
err_free_inst:
kfree(inst);
goto out;
OpenPOWER on IntegriCloud