aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/qlogic/qlge
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-08-08 17:24:34 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-08 18:57:29 -0400
commit440c734fefdabcf9caf4532e9bc51313cd0c546b (patch)
tree6f8a14948b9f3291e8790e75dbd6b84f4310c43e /drivers/net/ethernet/qlogic/qlge
parenta2d0abc6aacf2ba9e76ffad60f1782aa10942bce (diff)
qlogic: use pci_zalloc_consistent
Remove the now unnecessary memset too. Signed-off-by: Joe Perches <joe@perches.com> Cc: Manish Chopra <manish.chopra@qlogic.com> Cc: Sony Chacko <sony.chacko@qlogic.com> Cc: Rajesh Borundia <rajesh.borundia@qlogic.com> Cc: Shahed Shaikh <shahed.shaikh@qlogic.com> Cc: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> Cc: Ron Mercer <ron.mercer@qlogic.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qlge')
-rw-r--r--drivers/net/ethernet/qlogic/qlge/qlge_main.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
index b40050e03a56..d836ace52277 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
@@ -2727,23 +2727,22 @@ static void ql_free_shadow_space(struct ql_adapter *qdev)
2727static int ql_alloc_shadow_space(struct ql_adapter *qdev) 2727static int ql_alloc_shadow_space(struct ql_adapter *qdev)
2728{ 2728{
2729 qdev->rx_ring_shadow_reg_area = 2729 qdev->rx_ring_shadow_reg_area =
2730 pci_alloc_consistent(qdev->pdev, 2730 pci_zalloc_consistent(qdev->pdev, PAGE_SIZE,
2731 PAGE_SIZE, &qdev->rx_ring_shadow_reg_dma); 2731 &qdev->rx_ring_shadow_reg_dma);
2732 if (qdev->rx_ring_shadow_reg_area == NULL) { 2732 if (qdev->rx_ring_shadow_reg_area == NULL) {
2733 netif_err(qdev, ifup, qdev->ndev, 2733 netif_err(qdev, ifup, qdev->ndev,
2734 "Allocation of RX shadow space failed.\n"); 2734 "Allocation of RX shadow space failed.\n");
2735 return -ENOMEM; 2735 return -ENOMEM;
2736 } 2736 }
2737 memset(qdev->rx_ring_shadow_reg_area, 0, PAGE_SIZE); 2737
2738 qdev->tx_ring_shadow_reg_area = 2738 qdev->tx_ring_shadow_reg_area =
2739 pci_alloc_consistent(qdev->pdev, PAGE_SIZE, 2739 pci_zalloc_consistent(qdev->pdev, PAGE_SIZE,
2740 &qdev->tx_ring_shadow_reg_dma); 2740 &qdev->tx_ring_shadow_reg_dma);
2741 if (qdev->tx_ring_shadow_reg_area == NULL) { 2741 if (qdev->tx_ring_shadow_reg_area == NULL) {
2742 netif_err(qdev, ifup, qdev->ndev, 2742 netif_err(qdev, ifup, qdev->ndev,
2743 "Allocation of TX shadow space failed.\n"); 2743 "Allocation of TX shadow space failed.\n");
2744 goto err_wqp_sh_area; 2744 goto err_wqp_sh_area;
2745 } 2745 }
2746 memset(qdev->tx_ring_shadow_reg_area, 0, PAGE_SIZE);
2747 return 0; 2746 return 0;
2748 2747
2749err_wqp_sh_area: 2748err_wqp_sh_area: