@@ -130,7 +130,7 @@ static int tcindex_init(struct tcf_proto *tp)
struct tcindex_data *p;
pr_debug("tcindex_init(tp %p)\n", tp);
- p = kzalloc(sizeof(struct tcindex_data), GFP_KERNEL);
+ p = kzalloc(sizeof(*p), GFP_KERNEL);
if (!p)
return -ENOMEM;
@@ -413,10 +413,7 @@ tcindex_set_parms(struct net *net, struct tcf_proto *tp, unsigned long base,
} else {
struct tcindex_filter __rcu **hash;
- hash = kcalloc(cp->hash,
- sizeof(struct tcindex_filter *),
- GFP_KERNEL);
-
+ hash = kcalloc(cp->hash, sizeof(*hash), GFP_KERNEL);
if (!hash)
goto errout_alloc;