From: Lei Zhu <redacted>
Replace vmalloc() with the equivalent and more readable
vmallc_array(). This change has no functional impact.
Signed-off-by: Lei Zhu <redacted>
---
drivers/net/ethernet/intel/ixgbevf/ethtool.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbevf/ethtool.c b/drivers/net/ethernet/intel/ixgbevf/ethtool.c
index 537a60d5276f..72bdac8c0075 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ethtool.c
@@ -322,8 +322,9 @@ static int ixgbevf_set_ringparam(struct net_device *netdev,
}
if (new_rx_count != adapter->rx_ring_count) {
- rx_ring = vmalloc(array_size(sizeof(*rx_ring),
- adapter->num_rx_queues));
+ rx_ring = vmalloc_array(adapter->num_rx_queues,
+ sizeof(*rx_ring));
+
if (!rx_ring) {
err = -ENOMEM;
goto clear_reset;--
2.25.1