]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/net/ethernet/mellanox/mlx4/en_tx.c
treewide: use kv[mz]alloc* rather than opencoded variants
[mirror_ubuntu-artful-kernel.git] / drivers / net / ethernet / mellanox / mlx4 / en_tx.c
index 3ba89bc43d74d8c023776079bcd0bbadd70fb5c6..6ffd1849a604dda97e06d24074c9b27512240602 100644 (file)
@@ -70,13 +70,10 @@ int mlx4_en_create_tx_ring(struct mlx4_en_priv *priv,
        ring->full_size = ring->size - HEADROOM - MAX_DESC_TXBBS;
 
        tmp = size * sizeof(struct mlx4_en_tx_info);
-       ring->tx_info = kmalloc_node(tmp, GFP_KERNEL | __GFP_NOWARN, node);
+       ring->tx_info = kvmalloc_node(tmp, GFP_KERNEL, node);
        if (!ring->tx_info) {
-               ring->tx_info = vmalloc(tmp);
-               if (!ring->tx_info) {
-                       err = -ENOMEM;
-                       goto err_ring;
-               }
+               err = -ENOMEM;
+               goto err_ring;
        }
 
        en_dbg(DRV, priv, "Allocated tx_info ring at addr:%p size:%d\n",