Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3196265e97c661d9e9be04d5d64ca8ff3186536d
Commit:     3196265e97c661d9e9be04d5d64ca8ff3186536d
Parent:     184231bdb41fc4c385ae8e115f5afaff02fe1690
Author:     Al Viro <[EMAIL PROTECTED]>
AuthorDate: Tue Jan 23 12:25:08 2007 +0000
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Tue Jan 23 16:26:33 2007 -0500

    s2io bogus memset
    
    memset() after kmalloc() on size * 8 would better be on size * 8, not
    just size; fixed by switching to kcalloc() - it's more idiomatic anyway.
    
    Signed-off-by: Al Viro <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/s2io.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 250cdbe..1dd66b8 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -556,10 +556,9 @@ static int init_shared_mem(struct s2io_nic *nic)
                }
        }
 
-       nic->ufo_in_band_v = kmalloc((sizeof(u64) * size), GFP_KERNEL);
+       nic->ufo_in_band_v = kcalloc(size, sizeof(u64), GFP_KERNEL);
        if (!nic->ufo_in_band_v)
                return -ENOMEM;
-       memset(nic->ufo_in_band_v, 0, size);
 
        /* Allocation and initialization of RXDs in Rings */
        size = 0;
-
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