diff options
author | Joe Perches <joe@perches.com> | 2009-08-24 17:29:43 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-30 22:34:46 -0700 |
commit | 44364a035a4f7c5b58fd96b1a90b52746d1aab6b (patch) | |
tree | eef3322eb8828d1bd67d48038f0c47a6d46503cf /drivers/net/s2io.c | |
parent | 4f87032021be1aa0c3bb66b0c89d30cb35b57f8f (diff) | |
download | blackbird-obmc-linux-44364a035a4f7c5b58fd96b1a90b52746d1aab6b.tar.gz blackbird-obmc-linux-44364a035a4f7c5b58fd96b1a90b52746d1aab6b.zip |
s2io.c: use kzalloc
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/s2io.c')
-rw-r--r-- | drivers/net/s2io.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 75f2209bc013..134cdb39e701 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c @@ -3834,7 +3834,7 @@ static int s2io_enable_msi_x(struct s2io_nic *nic) int size; size = nic->num_entries * sizeof(struct msix_entry); - nic->entries = kmalloc(size, GFP_KERNEL); + nic->entries = kzalloc(size, GFP_KERNEL); if (!nic->entries) { DBG_PRINT(INFO_DBG, "%s: Memory allocation failed\n", \ __func__); @@ -3843,10 +3843,8 @@ static int s2io_enable_msi_x(struct s2io_nic *nic) } nic->mac_control.stats_info->sw_stat.mem_allocated += size; - memset(nic->entries, 0, size); - size = nic->num_entries * sizeof(struct s2io_msix_entry); - nic->s2io_entries = kmalloc(size, GFP_KERNEL); + nic->s2io_entries = kzalloc(size, GFP_KERNEL); if (!nic->s2io_entries) { DBG_PRINT(INFO_DBG, "%s: Memory allocation failed\n", __func__); @@ -3857,7 +3855,6 @@ static int s2io_enable_msi_x(struct s2io_nic *nic) return -ENOMEM; } nic->mac_control.stats_info->sw_stat.mem_allocated += size; - memset(nic->s2io_entries, 0, size); nic->entries[0].entry = 0; nic->s2io_entries[0].entry = 0; |