From c7fc05992afcf1d63d6d5fb6142c8d39094dbca9 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Wed, 24 May 2006 13:02:26 +1000 Subject: [CRYPTO] api: Added cra_init/cra_exit This patch adds the hooks cra_init/cra_exit which are called during a tfm's construction and destruction respectively. This will be used by the instances to allocate child tfm's. For now this lets us get rid of the coa_init/coa_exit functions which are used for exactly that purpose (unlike the dia_init function which is called for each transaction). In fact the coa_exit path is currently buggy as it may get called twice when an error is encountered during initialisation. Signed-off-by: Herbert Xu --- crypto/compress.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'crypto/compress.c') diff --git a/crypto/compress.c b/crypto/compress.c index f3e0733..eca182a 100644 --- a/crypto/compress.c +++ b/crypto/compress.c @@ -41,21 +41,14 @@ int crypto_init_compress_flags(struct crypto_tfm *tfm, u32 flags) int crypto_init_compress_ops(struct crypto_tfm *tfm) { - int ret = 0; struct compress_tfm *ops = &tfm->crt_compress; - - ret = tfm->__crt_alg->cra_compress.coa_init(tfm); - if (ret) - goto out; ops->cot_compress = crypto_compress; ops->cot_decompress = crypto_decompress; -out: - return ret; + return 0; } void crypto_exit_compress_ops(struct crypto_tfm *tfm) { - tfm->__crt_alg->cra_compress.coa_exit(tfm); } -- cgit v1.1