From bbeb563f7bb5e703e4d60c18bed81c987781343f Mon Sep 17 00:00:00 2001 From: Eric Sesterhenn Date: Mon, 6 Mar 2006 21:42:07 +1100 Subject: [CRYPTO] all: Use kzalloc where possible this patch converts crypto/ to kzalloc usage. Compile tested with allyesconfig. Signed-off-by: Eric Sesterhenn Signed-off-by: Herbert Xu --- crypto/deflate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'crypto/deflate.c') diff --git a/crypto/deflate.c b/crypto/deflate.c index bc73342cd1e..f209368d62a 100644 --- a/crypto/deflate.c +++ b/crypto/deflate.c @@ -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; -- cgit v1.2.3