Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=50aa485e1abb7566ce68418c7bbc6a6b454f9039
Commit:     50aa485e1abb7566ce68418c7bbc6a6b454f9039
Parent:     916e89fdd1b21eec4abbc9e228757db77660fff2
Author:     Mariusz Kozlowski <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 31 14:04:57 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Tue Jul 31 14:04:57 2007 -0700

    [BBC_I2C]: kmalloc + memset conversion to kzalloc
    
    Signed-off-by: Mariusz Kozlowski <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 drivers/sbus/char/bbc_i2c.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c
index fbadd4d..ac8ef2c 100644
--- a/drivers/sbus/char/bbc_i2c.c
+++ b/drivers/sbus/char/bbc_i2c.c
@@ -357,13 +357,13 @@ static void __init reset_one_i2c(struct bbc_i2c_bus *bp)
 
 static int __init attach_one_i2c(struct linux_ebus_device *edev, int index)
 {
-       struct bbc_i2c_bus *bp = kmalloc(sizeof(*bp), GFP_KERNEL);
+       struct bbc_i2c_bus *bp;
        struct linux_ebus_child *echild;
        int entry;
 
+       bp = kzalloc(sizeof(*bp), GFP_KERNEL);
        if (!bp)
                return -ENOMEM;
-       memset(bp, 0, sizeof(*bp));
 
        bp->i2c_control_regs = ioremap(edev->resource[0].start, 0x2);
        if (!bp->i2c_control_regs)
-
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