sch_choke: Use kvcalloc
authorJoe Perches <joe@perches.com>
Tue, 28 Jan 2020 19:12:03 +0000 (11:12 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Jan 2020 10:58:10 +0000 (11:58 +0100)
Convert the use of kvmalloc_array with __GFP_ZERO to
the equivalent kvcalloc.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_choke.c

index dba7037..a36974e 100644 (file)
@@ -377,7 +377,7 @@ static int choke_change(struct Qdisc *sch, struct nlattr *opt,
        if (mask != q->tab_mask) {
                struct sk_buff **ntab;
 
-               ntab = kvmalloc_array((mask + 1), sizeof(struct sk_buff *), GFP_KERNEL | __GFP_ZERO);
+               ntab = kvcalloc(mask + 1, sizeof(struct sk_buff *), GFP_KERNEL);
                if (!ntab)
                        return -ENOMEM;