Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

textsearch: convert kmalloc + memset to kzalloc

convert kmalloc + memset to kzalloc for alloc_ts_config

Signed-off-by: Joonwoo Park <joonwpark81@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Joonwoo Park and committed by
David S. Miller
dde77e60 43138833

+1 -2
+1 -2
include/linux/textsearch.h
··· 162 162 { 163 163 struct ts_config *conf; 164 164 165 - conf = kmalloc(TS_PRIV_ALIGN(sizeof(*conf)) + payload, gfp_mask); 165 + conf = kzalloc(TS_PRIV_ALIGN(sizeof(*conf)) + payload, gfp_mask); 166 166 if (conf == NULL) 167 167 return ERR_PTR(-ENOMEM); 168 168 169 - memset(conf, 0, TS_PRIV_ALIGN(sizeof(*conf)) + payload); 170 169 return conf; 171 170 } 172 171