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

    drivers/char/consolemap.c: kmalloc + memset conversion to kzalloc
    
     drivers/char/consolemap.c | 22678 -> 22650 (-28 bytes)
     drivers/char/consolemap.o | 90113 -> 90029 (-84 bytes)
    
    Signed-off-by: Mariusz Kozlowski <[EMAIL PROTECTED]>
    Acked-by: Alan Cox <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/char/consolemap.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/char/consolemap.c b/drivers/char/consolemap.c
index 4b3916f..163f3fc 100644
--- a/drivers/char/consolemap.c
+++ b/drivers/char/consolemap.c
@@ -494,12 +494,11 @@ int con_clear_unimap(struct vc_data *vc, struct 
unimapinit *ui)
        p = (struct uni_pagedir *)*vc->vc_uni_pagedir_loc;
        if (p && p->readonly) return -EIO;
        if (!p || --p->refcount) {
-               q = kmalloc(sizeof(*p), GFP_KERNEL);
+               q = kzalloc(sizeof(*p), GFP_KERNEL);
                if (!q) {
                        if (p) p->refcount++;
                        return -ENOMEM;
                }
-               memset(q, 0, sizeof(*q));
                q->refcount=1;
                *vc->vc_uni_pagedir_loc = (unsigned long)q;
        } else {
-
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