aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/linux/textsearch.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/textsearch.h b/include/linux/textsearch.h
index 6c34cf28b7a..d9a85d61638 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;
}