diff options
-rw-r--r-- | drivers/net/ethernet/intel/e100.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c index 4d10270ddf8f..184f11242f56 100644 --- a/drivers/net/ethernet/intel/e100.c +++ b/drivers/net/ethernet/intel/e100.c | |||
@@ -1910,11 +1910,10 @@ static int e100_alloc_cbs(struct nic *nic) | |||
1910 | nic->cb_to_use = nic->cb_to_send = nic->cb_to_clean = NULL; | 1910 | nic->cb_to_use = nic->cb_to_send = nic->cb_to_clean = NULL; |
1911 | nic->cbs_avail = 0; | 1911 | nic->cbs_avail = 0; |
1912 | 1912 | ||
1913 | nic->cbs = pci_pool_alloc(nic->cbs_pool, GFP_KERNEL, | 1913 | nic->cbs = pci_pool_zalloc(nic->cbs_pool, GFP_KERNEL, |
1914 | &nic->cbs_dma_addr); | 1914 | &nic->cbs_dma_addr); |
1915 | if (!nic->cbs) | 1915 | if (!nic->cbs) |
1916 | return -ENOMEM; | 1916 | return -ENOMEM; |
1917 | memset(nic->cbs, 0, count * sizeof(struct cb)); | ||
1918 | 1917 | ||
1919 | for (cb = nic->cbs, i = 0; i < count; cb++, i++) { | 1918 | for (cb = nic->cbs, i = 0; i < count; cb++, i++) { |
1920 | cb->next = (i + 1 < count) ? cb + 1 : nic->cbs; | 1919 | cb->next = (i + 1 < count) ? cb + 1 : nic->cbs; |