]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/net/ethernet/broadcom/bnx2.c
drivers:net: dma_alloc_coherent: use __GFP_ZERO instead of memset(, 0)
[karo-tx-linux.git] / drivers / net / ethernet / broadcom / bnx2.c
index 2f0ba8f2fd6c08f85547c11eb9744c831caea23c..e709296e3b85dbee34f5acadabe9a0a987cee427 100644 (file)
@@ -854,12 +854,11 @@ bnx2_alloc_mem(struct bnx2 *bp)
                                sizeof(struct statistics_block);
 
        status_blk = dma_alloc_coherent(&bp->pdev->dev, bp->status_stats_size,
-                                       &bp->status_blk_mapping, GFP_KERNEL);
+                                       &bp->status_blk_mapping,
+                                       GFP_KERNEL | __GFP_ZERO);
        if (status_blk == NULL)
                goto alloc_mem_err;
 
-       memset(status_blk, 0, bp->status_stats_size);
-
        bnapi = &bp->bnx2_napi[0];
        bnapi->status_blk.msi = status_blk;
        bnapi->hw_tx_cons_ptr =