aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_gred.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/sch_gred.c')
-rw-r--r--net/sched/sch_gred.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c
index 29a2dd9f3029..18e81a8ffb01 100644
--- a/net/sched/sch_gred.c
+++ b/net/sched/sch_gred.c
@@ -18,7 +18,6 @@
18 * For all the glorious comments look at include/net/red.h 18 * For all the glorious comments look at include/net/red.h
19 */ 19 */
20 20
21#include <linux/config.h>
22#include <linux/module.h> 21#include <linux/module.h>
23#include <linux/types.h> 22#include <linux/types.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
@@ -407,10 +406,9 @@ static inline int gred_change_vq(struct Qdisc *sch, int dp,
407 struct gred_sched_data *q; 406 struct gred_sched_data *q;
408 407
409 if (table->tab[dp] == NULL) { 408 if (table->tab[dp] == NULL) {
410 table->tab[dp] = kmalloc(sizeof(*q), GFP_KERNEL); 409 table->tab[dp] = kzalloc(sizeof(*q), GFP_KERNEL);
411 if (table->tab[dp] == NULL) 410 if (table->tab[dp] == NULL)
412 return -ENOMEM; 411 return -ENOMEM;
413 memset(table->tab[dp], 0, sizeof(*q));
414 } 412 }
415 413
416 q = table->tab[dp]; 414 q = table->tab[dp];