]> err.no Git - linux-2.6/commitdiff
textsearch: convert kmalloc + memset to kzalloc
authorJoonwoo Park <joonwpark81@gmail.com>
Tue, 8 Jul 2008 09:38:40 +0000 (02:38 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 8 Jul 2008 09:38:40 +0000 (02:38 -0700)
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>
include/linux/textsearch.h

index 6c34cf28b7aa2fd3ec27338e7a2b3208d76227cc..d9a85d616385d3791c198fbd223a9b7cf222c30d 100644 (file)
@@ -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;
 }