summaryrefslogtreecommitdiffstats
path: root/net/openvswitch/datapath.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/openvswitch/datapath.c')
-rw-r--r--net/openvswitch/datapath.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index a61818e94396..0f5ce77460d4 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -1578,8 +1578,9 @@ static int ovs_dp_cmd_new(struct sk_buff *skb, struct genl_info *info)
1578 goto err_destroy_table; 1578 goto err_destroy_table;
1579 } 1579 }
1580 1580
1581 dp->ports = kmalloc(DP_VPORT_HASH_BUCKETS * sizeof(struct hlist_head), 1581 dp->ports = kmalloc_array(DP_VPORT_HASH_BUCKETS,
1582 GFP_KERNEL); 1582 sizeof(struct hlist_head),
1583 GFP_KERNEL);
1583 if (!dp->ports) { 1584 if (!dp->ports) {
1584 err = -ENOMEM; 1585 err = -ENOMEM;
1585 goto err_destroy_percpu; 1586 goto err_destroy_percpu;