Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c48e3fca3f063edb0c8c4d163e880b94c1d9f93d
Commit:     c48e3fca3f063edb0c8c4d163e880b94c1d9f93d
Parent:     0268bd0a807fc5cc41ced9cce95efe1b43e8fa52
Author:     Yan Burman <[EMAIL PROTECTED]>
AuthorDate: Tue Dec 12 20:03:10 2006 +0100
Committer:  Adrian Bunk <[EMAIL PROTECTED]>
CommitDate: Tue Dec 12 20:03:10 2006 +0100

    e100: replace kmalloc with kcalloc
    
    Replace kmalloc+memset with kcalloc
    
    Signed-off-by: Yan Burman <[EMAIL PROTECTED]>
    Acked-By: Auke Kok <[EMAIL PROTECTED]>
    Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>
---
 drivers/net/e100.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index 03bf164..c2ae2a2 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -1930,9 +1930,8 @@ static int e100_rx_alloc_list(struct nic *nic)
        nic->rx_to_use = nic->rx_to_clean = NULL;
        nic->ru_running = RU_UNINITIALIZED;
 
-       if(!(nic->rxs = kmalloc(sizeof(struct rx) * count, GFP_ATOMIC)))
+       if(!(nic->rxs = kcalloc(count, sizeof(struct rx), GFP_ATOMIC)))
                return -ENOMEM;
-       memset(nic->rxs, 0, sizeof(struct rx) * count);
 
        for(rx = nic->rxs, i = 0; i < count; rx++, i++) {
                rx->next = (i + 1 < count) ? rx + 1 : nic->rxs;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to