Commit 9472d763b3087f2899379a77b39499fcd37d6d2b

Authored by Richard Hartmann
Committed by Herbert Xu
1 parent c9af70fb86

crypto: deflate - Fix checkpatch errors

Signed-off-by: Richard Hartmann <richih.mailinglist@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Showing 1 changed file with 10 additions and 10 deletions Side-by-side Diff

1   -/*
  1 +/*
2 2 * Cryptographic API.
3 3 *
4 4 * Deflate algorithm (RFC 1951), implemented here primarily for use
5 5 * by IPCOMP (RFC 3173 & RFC 2394).
6 6 *
7 7 * Copyright (c) 2003 James Morris <jmorris@intercode.com.au>
8   - *
  8 + *
9 9 * This program is free software; you can redistribute it and/or modify it
10 10 * under the terms of the GNU General Public License as published by the Free
11   - * Software Foundation; either version 2 of the License, or (at your option)
  11 + * Software Foundation; either version 2 of the License, or (at your option)
12 12 * any later version.
13 13 *
14 14 * FIXME: deflate transforms will require up to a total of about 436k of kernel
... ... @@ -49,7 +49,7 @@
49 49 struct z_stream_s *stream = &ctx->comp_stream;
50 50  
51 51 stream->workspace = vmalloc(zlib_deflate_workspacesize());
52   - if (!stream->workspace ) {
  52 + if (!stream->workspace) {
53 53 ret = -ENOMEM;
54 54 goto out;
55 55 }
... ... @@ -61,7 +61,7 @@
61 61 ret = -EINVAL;
62 62 goto out_free;
63 63 }
64   -out:
  64 +out:
65 65 return ret;
66 66 out_free:
67 67 vfree(stream->workspace);
... ... @@ -74,7 +74,7 @@
74 74 struct z_stream_s *stream = &ctx->decomp_stream;
75 75  
76 76 stream->workspace = kzalloc(zlib_inflate_workspacesize(), GFP_KERNEL);
77   - if (!stream->workspace ) {
  77 + if (!stream->workspace) {
78 78 ret = -ENOMEM;
79 79 goto out;
80 80 }
... ... @@ -106,7 +106,7 @@
106 106 {
107 107 struct deflate_ctx *ctx = crypto_tfm_ctx(tfm);
108 108 int ret;
109   -
  109 +
110 110 ret = deflate_comp_init(ctx);
111 111 if (ret)
112 112 goto out;
113 113  
... ... @@ -153,11 +153,11 @@
153 153 out:
154 154 return ret;
155 155 }
156   -
  156 +
157 157 static int deflate_decompress(struct crypto_tfm *tfm, const u8 *src,
158 158 unsigned int slen, u8 *dst, unsigned int *dlen)
159 159 {
160   -
  160 +
161 161 int ret = 0;
162 162 struct deflate_ctx *dctx = crypto_tfm_ctx(tfm);
163 163 struct z_stream_s *stream = &dctx->decomp_stream;
... ... @@ -182,7 +182,7 @@
182 182 if (ret == Z_OK && !stream->avail_in && stream->avail_out) {
183 183 u8 zerostuff = 0;
184 184 stream->next_in = &zerostuff;
185   - stream->avail_in = 1;
  185 + stream->avail_in = 1;
186 186 ret = zlib_inflate(stream, Z_FINISH);
187 187 }
188 188 if (ret != Z_STREAM_END) {