提交 dde77e60 编写于 作者: J Joonwoo Park 提交者: David S. Miller

textsearch: convert kmalloc + memset to kzalloc

convert kmalloc + memset to kzalloc for alloc_ts_config
Signed-off-by: NJoonwoo Park <joonwpark81@gmail.com>
Signed-off-by: NPatrick McHardy <kaber@trash.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 43138833
......@@ -162,11 +162,10 @@ static inline struct ts_config *alloc_ts_config(size_t payload,
{
struct ts_config *conf;
conf = kmalloc(TS_PRIV_ALIGN(sizeof(*conf)) + payload, gfp_mask);
conf = kzalloc(TS_PRIV_ALIGN(sizeof(*conf)) + payload, gfp_mask);
if (conf == NULL)
return ERR_PTR(-ENOMEM);
memset(conf, 0, TS_PRIV_ALIGN(sizeof(*conf)) + payload);
return conf;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册