]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - crypto/ofb.c
Merge tag 'riscv-for-linus-5.6-mw0' of git://git.kernel.org/pub/scm/linux/kernel...
[linux.git] / crypto / ofb.c
index 133ff4c7f2c6790fede04b26cf42d9a8bc9032c5..2ec68e3f2c552b3e925c41591042ebbade3be6dd 100644 (file)
@@ -55,10 +55,12 @@ static int crypto_ofb_create(struct crypto_template *tmpl, struct rtattr **tb)
        struct crypto_alg *alg;
        int err;
 
-       inst = skcipher_alloc_instance_simple(tmpl, tb, &alg);
+       inst = skcipher_alloc_instance_simple(tmpl, tb);
        if (IS_ERR(inst))
                return PTR_ERR(inst);
 
+       alg = skcipher_ialg_simple(inst);
+
        /* OFB mode is a stream cipher. */
        inst->alg.base.cra_blocksize = 1;
 
@@ -75,7 +77,6 @@ static int crypto_ofb_create(struct crypto_template *tmpl, struct rtattr **tb)
        if (err)
                inst->free(inst);
 
-       crypto_mod_put(alg);
        return err;
 }