@@ -198,22 +198,16 @@ static int zip_decompress(const u8 *src, unsigned int slen,
198
198
/* Legacy Compress framework start */
199
199
int zip_alloc_comp_ctx_deflate (struct crypto_tfm * tfm )
200
200
{
201
- int ret ;
202
201
struct zip_kernel_ctx * zip_ctx = crypto_tfm_ctx (tfm );
203
202
204
- ret = zip_ctx_init (zip_ctx , 0 );
205
-
206
- return ret ;
203
+ return zip_ctx_init (zip_ctx , 0 );
207
204
}
208
205
209
206
int zip_alloc_comp_ctx_lzs (struct crypto_tfm * tfm )
210
207
{
211
- int ret ;
212
208
struct zip_kernel_ctx * zip_ctx = crypto_tfm_ctx (tfm );
213
209
214
- ret = zip_ctx_init (zip_ctx , 1 );
215
-
216
- return ret ;
210
+ return zip_ctx_init (zip_ctx , 1 );
217
211
}
218
212
219
213
void zip_free_comp_ctx (struct crypto_tfm * tfm )
@@ -227,24 +221,18 @@ int zip_comp_compress(struct crypto_tfm *tfm,
227
221
const u8 * src , unsigned int slen ,
228
222
u8 * dst , unsigned int * dlen )
229
223
{
230
- int ret ;
231
224
struct zip_kernel_ctx * zip_ctx = crypto_tfm_ctx (tfm );
232
225
233
- ret = zip_compress (src , slen , dst , dlen , zip_ctx );
234
-
235
- return ret ;
226
+ return zip_compress (src , slen , dst , dlen , zip_ctx );
236
227
}
237
228
238
229
int zip_comp_decompress (struct crypto_tfm * tfm ,
239
230
const u8 * src , unsigned int slen ,
240
231
u8 * dst , unsigned int * dlen )
241
232
{
242
- int ret ;
243
233
struct zip_kernel_ctx * zip_ctx = crypto_tfm_ctx (tfm );
244
234
245
- ret = zip_decompress (src , slen , dst , dlen , zip_ctx );
246
-
247
- return ret ;
235
+ return zip_decompress (src , slen , dst , dlen , zip_ctx );
248
236
} /* Legacy compress framework end */
249
237
250
238
/* SCOMP framework start */
@@ -298,22 +286,16 @@ int zip_scomp_compress(struct crypto_scomp *tfm,
298
286
const u8 * src , unsigned int slen ,
299
287
u8 * dst , unsigned int * dlen , void * ctx )
300
288
{
301
- int ret ;
302
289
struct zip_kernel_ctx * zip_ctx = ctx ;
303
290
304
- ret = zip_compress (src , slen , dst , dlen , zip_ctx );
305
-
306
- return ret ;
291
+ return zip_compress (src , slen , dst , dlen , zip_ctx );
307
292
}
308
293
309
294
int zip_scomp_decompress (struct crypto_scomp * tfm ,
310
295
const u8 * src , unsigned int slen ,
311
296
u8 * dst , unsigned int * dlen , void * ctx )
312
297
{
313
- int ret ;
314
298
struct zip_kernel_ctx * zip_ctx = ctx ;
315
299
316
- ret = zip_decompress (src , slen , dst , dlen , zip_ctx );
317
-
318
- return ret ;
300
+ return zip_decompress (src , slen , dst , dlen , zip_ctx );
319
301
} /* SCOMP framework end */
0 commit comments