Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f035ac821bf8c36a558471e78c514a96202a1bda
Commit:     f035ac821bf8c36a558471e78c514a96202a1bda
Parent:     392b7bc13e9e9390bd2deb923d0326c3a50a9a00
Author:     Mariusz Kozlowski <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 16 23:26:44 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Oct 17 08:42:50 2007 -0700

    doc firmware_sample_firmware_class.c: kmalloc + memset conversion to kzalloc
    
     Documentation/firmware_class/firmware_sample_firmware_class.c | 5246 -> 
5211 (-35 bytes)
    
    Signed-off-by: Mariusz Kozlowski <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 .../firmware_sample_firmware_class.c               |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Documentation/firmware_class/firmware_sample_firmware_class.c 
b/Documentation/firmware_class/firmware_sample_firmware_class.c
index fba943a..2de6285 100644
--- a/Documentation/firmware_class/firmware_sample_firmware_class.c
+++ b/Documentation/firmware_class/firmware_sample_firmware_class.c
@@ -109,15 +109,15 @@ static int fw_setup_class_device(struct class_device 
*class_dev,
                                 const char *fw_name,
                                 struct device *device)
 {
-       int retval = 0;
-       struct firmware_priv *fw_priv = kmalloc(sizeof(struct firmware_priv),
-                                               GFP_KERNEL);
+       int retval;
+       struct firmware_priv *fw_priv;
 
-       if(!fw_priv){
+       fw_priv = kzalloc(sizeof(struct firmware_priv), GFP_KERNEL);
+       if (!fw_priv) {
                retval = -ENOMEM;
                goto out;
        }
-       memset(fw_priv, 0, sizeof(*fw_priv));
+
        memset(class_dev, 0, sizeof(*class_dev));
 
        strncpy(fw_priv->fw_id, fw_name, FIRMWARE_NAME_MAX);
-
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