From: Joonwoo Park Date: Tue, 8 Jul 2008 09:38:40 +0000 (-0700) Subject: textsearch: convert kmalloc + memset to kzalloc X-Git-Tag: v2.6.27-rc1~969^2~199 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dde77e604497dada6f224a685278dfb27747ae52;p=linux-2.6 textsearch: convert kmalloc + memset to kzalloc convert kmalloc + memset to kzalloc for alloc_ts_config Signed-off-by: Joonwoo Park Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- diff --git a/include/linux/textsearch.h b/include/linux/textsearch.h index 6c34cf28b7..d9a85d6163 100644 --- a/include/linux/textsearch.h +++ b/include/linux/textsearch.h @@ -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; }