mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
crypto: Use vzalloc
Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
This commit is contained in:
parent
8ff590903d
commit
c8484594ae
2 changed files with 2 additions and 4 deletions
|
|
@ -48,12 +48,11 @@ static int deflate_comp_init(struct deflate_ctx *ctx)
|
|||
int ret = 0;
|
||||
struct z_stream_s *stream = &ctx->comp_stream;
|
||||
|
||||
stream->workspace = vmalloc(zlib_deflate_workspacesize());
|
||||
stream->workspace = vzalloc(zlib_deflate_workspacesize());
|
||||
if (!stream->workspace) {
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
memset(stream->workspace, 0, zlib_deflate_workspacesize());
|
||||
ret = zlib_deflateInit2(stream, DEFLATE_DEF_LEVEL, Z_DEFLATED,
|
||||
-DEFLATE_DEF_WINBITS, DEFLATE_DEF_MEMLEVEL,
|
||||
Z_DEFAULT_STRATEGY);
|
||||
|
|
|
|||
Loading…
Reference in a new issue