mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
[CRYPTO] all: Use kzalloc where possible
this patch converts crypto/ to kzalloc usage. Compile tested with allyesconfig. Signed-off-by: Eric Sesterhenn <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
This commit is contained in:
parent
f10b7897ee
commit
bbeb563f7b
2 changed files with 2 additions and 5 deletions
|
|
@ -73,12 +73,11 @@ static int deflate_decomp_init(struct deflate_ctx *ctx)
|
|||
int ret = 0;
|
||||
struct z_stream_s *stream = &ctx->decomp_stream;
|
||||
|
||||
stream->workspace = kmalloc(zlib_inflate_workspacesize(), GFP_KERNEL);
|
||||
stream->workspace = kzalloc(zlib_inflate_workspacesize(), GFP_KERNEL);
|
||||
if (!stream->workspace ) {
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
memset(stream->workspace, 0, zlib_inflate_workspacesize());
|
||||
ret = zlib_inflateInit2(stream, -DEFLATE_DEF_WINBITS);
|
||||
if (ret != Z_OK) {
|
||||
ret = -EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue