Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cc60d8baa35c995bf8c40a9730b894993ddb43b9
Commit:     cc60d8baa35c995bf8c40a9730b894993ddb43b9
Parent:     ab0579685d34eb2c6b101534796ba64c8b9107b5
Author:     Mariusz Kozlowski <[EMAIL PROTECTED]>
AuthorDate: Wed Aug 1 23:46:44 2007 +0200
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Wed Aug 1 23:46:44 2007 +0200

    drivers/ide/arm/icside.c: kmalloc + memset conversion to kzalloc
    
    Is this a bug? In original verison memset cleared sizeof(state) bytes
    instead of sizeof(*state). If it was intentional then this patch is invalid.
    If not intentional -> valid :) Please review.
    
    Bart: Yes, it is a bug so this patch is a valid bugfix. :-)
    
     drivers/ide/arm/icside.c | 18883 -> 18849 (-34 bytes)
    
    Signed-off-by: Mariusz Kozlowski <[EMAIL PROTECTED]>
    Cc: Andrew Morton <[EMAIL PROTECTED]>
    Cc: Russell King <[EMAIL PROTECTED]>
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 drivers/ide/arm/icside.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c
index c89b5f4..8a9b98f 100644
--- a/drivers/ide/arm/icside.c
+++ b/drivers/ide/arm/icside.c
@@ -693,13 +693,12 @@ icside_probe(struct expansion_card *ec, const struct 
ecard_id *id)
        if (ret)
                goto out;
 
-       state = kmalloc(sizeof(struct icside_state), GFP_KERNEL);
+       state = kzalloc(sizeof(struct icside_state), GFP_KERNEL);
        if (!state) {
                ret = -ENOMEM;
                goto release;
        }
 
-       memset(state, 0, sizeof(state));
        state->type     = ICS_TYPE_NOTYPE;
        state->dev      = &ec->dev;
 
-
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