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

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

diff --git a/drivers/sbus/char/bbc_envctrl.c b/drivers/sbus/char/bbc_envctrl.c
index e821a15..0bde269 100644
--- a/drivers/sbus/char/bbc_envctrl.c
+++ b/drivers/sbus/char/bbc_envctrl.c
@@ -479,11 +479,12 @@ static int kenvctrld(void *__unused)
 
 static void attach_one_temp(struct linux_ebus_child *echild, int temp_idx)
 {
-       struct bbc_cpu_temperature *tp = kmalloc(sizeof(*tp), GFP_KERNEL);
+       struct bbc_cpu_temperature *tp;
 
+       tp = kzalloc(sizeof(*tp), GFP_KERNEL);
        if (!tp)
                return;
-       memset(tp, 0, sizeof(*tp));
+
        tp->client = bbc_i2c_attach(echild);
        if (!tp->client) {
                kfree(tp);
@@ -525,11 +526,12 @@ static void attach_one_temp(struct linux_ebus_child 
*echild, int temp_idx)
 
 static void attach_one_fan(struct linux_ebus_child *echild, int fan_idx)
 {
-       struct bbc_fan_control *fp = kmalloc(sizeof(*fp), GFP_KERNEL);
+       struct bbc_fan_control *fp;
 
+       fp = kzalloc(sizeof(*fp), GFP_KERNEL);
        if (!fp)
                return;
-       memset(fp, 0, sizeof(*fp));
+
        fp->client = bbc_i2c_attach(echild);
        if (!fp->client) {
                kfree(fp);
-
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