mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -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
|
|
@ -95,11 +95,10 @@ static int zlib_compress_setup(struct crypto_pcomp *tfm, void *params,
|
|||
zlib_comp_exit(ctx);
|
||||
|
||||
workspacesize = zlib_deflate_workspacesize();
|
||||
stream->workspace = vmalloc(workspacesize);
|
||||
stream->workspace = vzalloc(workspacesize);
|
||||
if (!stream->workspace)
|
||||
return -ENOMEM;
|
||||
|
||||
memset(stream->workspace, 0, workspacesize);
|
||||
ret = zlib_deflateInit2(stream,
|
||||
tb[ZLIB_COMP_LEVEL]
|
||||
? nla_get_u32(tb[ZLIB_COMP_LEVEL])
|
||||
|
|
|
|||
Loading…
Reference in a new issue