]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/blobdiff - net/openvswitch/datapath.c
treewide: kmalloc() -> kmalloc_array()
[mirror_ubuntu-eoan-kernel.git] / net / openvswitch / datapath.c
index a61818e943969936ba4cc2c49818b7b889d5faf5..0f5ce77460d44099277e142e37d11620e426e9cb 100644 (file)
@@ -1578,8 +1578,9 @@ static int ovs_dp_cmd_new(struct sk_buff *skb, struct genl_info *info)
                goto err_destroy_table;
        }
 
-       dp->ports = kmalloc(DP_VPORT_HASH_BUCKETS * sizeof(struct hlist_head),
-                           GFP_KERNEL);
+       dp->ports = kmalloc_array(DP_VPORT_HASH_BUCKETS,
+                                 sizeof(struct hlist_head),
+                                 GFP_KERNEL);
        if (!dp->ports) {
                err = -ENOMEM;
                goto err_destroy_percpu;