diff options
-rw-r--r-- | include/linux/textsearch.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/textsearch.h b/include/linux/textsearch.h index 6c34cf28b7aa..d9a85d616385 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, | |||
162 | { | 162 | { |
163 | struct ts_config *conf; | 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 | if (conf == NULL) | 166 | if (conf == NULL) |
167 | return ERR_PTR(-ENOMEM); | 167 | return ERR_PTR(-ENOMEM); |
168 | 168 | ||
169 | memset(conf, 0, TS_PRIV_ALIGN(sizeof(*conf)) + payload); | ||
170 | return conf; | 169 | return conf; |
171 | } | 170 | } |
172 | 171 | ||