diff options
Diffstat (limited to 'crypto/compress.c')
-rw-r--r-- | crypto/compress.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/crypto/compress.c b/crypto/compress.c index eb36d9364da3..eca182aa3380 100644 --- a/crypto/compress.c +++ b/crypto/compress.c | |||
@@ -22,8 +22,7 @@ static int crypto_compress(struct crypto_tfm *tfm, | |||
22 | const u8 *src, unsigned int slen, | 22 | const u8 *src, unsigned int slen, |
23 | u8 *dst, unsigned int *dlen) | 23 | u8 *dst, unsigned int *dlen) |
24 | { | 24 | { |
25 | return tfm->__crt_alg->cra_compress.coa_compress(crypto_tfm_ctx(tfm), | 25 | return tfm->__crt_alg->cra_compress.coa_compress(tfm, src, slen, dst, |
26 | src, slen, dst, | ||
27 | dlen); | 26 | dlen); |
28 | } | 27 | } |
29 | 28 | ||
@@ -31,8 +30,7 @@ static int crypto_decompress(struct crypto_tfm *tfm, | |||
31 | const u8 *src, unsigned int slen, | 30 | const u8 *src, unsigned int slen, |
32 | u8 *dst, unsigned int *dlen) | 31 | u8 *dst, unsigned int *dlen) |
33 | { | 32 | { |
34 | return tfm->__crt_alg->cra_compress.coa_decompress(crypto_tfm_ctx(tfm), | 33 | return tfm->__crt_alg->cra_compress.coa_decompress(tfm, src, slen, dst, |
35 | src, slen, dst, | ||
36 | dlen); | 34 | dlen); |
37 | } | 35 | } |
38 | 36 | ||
@@ -43,21 +41,14 @@ int crypto_init_compress_flags(struct crypto_tfm *tfm, u32 flags) | |||
43 | 41 | ||
44 | int crypto_init_compress_ops(struct crypto_tfm *tfm) | 42 | int crypto_init_compress_ops(struct crypto_tfm *tfm) |
45 | { | 43 | { |
46 | int ret = 0; | ||
47 | struct compress_tfm *ops = &tfm->crt_compress; | 44 | struct compress_tfm *ops = &tfm->crt_compress; |
48 | |||
49 | ret = tfm->__crt_alg->cra_compress.coa_init(crypto_tfm_ctx(tfm)); | ||
50 | if (ret) | ||
51 | goto out; | ||
52 | 45 | ||
53 | ops->cot_compress = crypto_compress; | 46 | ops->cot_compress = crypto_compress; |
54 | ops->cot_decompress = crypto_decompress; | 47 | ops->cot_decompress = crypto_decompress; |
55 | 48 | ||
56 | out: | 49 | return 0; |
57 | return ret; | ||
58 | } | 50 | } |
59 | 51 | ||
60 | void crypto_exit_compress_ops(struct crypto_tfm *tfm) | 52 | void crypto_exit_compress_ops(struct crypto_tfm *tfm) |
61 | { | 53 | { |
62 | tfm->__crt_alg->cra_compress.coa_exit(crypto_tfm_ctx(tfm)); | ||
63 | } | 54 | } |