Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=40562f812bb4b0211da07ad1927af030b089d3d3
Commit:     40562f812bb4b0211da07ad1927af030b089d3d3
Parent:     d67d1d7fc344e44b51296327a0b09a9419ca307f
Author:     Mariusz Kozlowski <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 31 23:22:18 2007 +0200
Committer:  David Woodhouse <[EMAIL PROTECTED]>
CommitDate: Wed Aug 1 11:03:17 2007 +0100

    Documentation/DocBook/mtdnand.tmpl: kmalloc + memset conversion to kzalloc
    
    Signed-off-by: Mariusz Kozlowski <[EMAIL PROTECTED]>
    Signed-off-by: David Woodhouse <[EMAIL PROTECTED]>
---
 Documentation/DocBook/mtdnand.tmpl |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/Documentation/DocBook/mtdnand.tmpl 
b/Documentation/DocBook/mtdnand.tmpl
index a8c8cce..6fbc41d 100644
--- a/Documentation/DocBook/mtdnand.tmpl
+++ b/Documentation/DocBook/mtdnand.tmpl
@@ -275,16 +275,13 @@ int __init board_init (void)
        int err = 0;
 
        /* Allocate memory for MTD device structure and private data */
-       board_mtd = kmalloc (sizeof(struct mtd_info) + sizeof (struct 
nand_chip), GFP_KERNEL);
+       board_mtd = kzalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip), 
GFP_KERNEL);
        if (!board_mtd) {
                printk ("Unable to allocate NAND MTD device structure.\n");
                err = -ENOMEM;
                goto out;
        }
 
-       /* Initialize structures */
-       memset ((char *) board_mtd, 0, sizeof(struct mtd_info) + sizeof(struct 
nand_chip));
-
        /* map physical adress */
        baseaddr = (unsigned long)ioremap(CHIP_PHYSICAL_ADDRESS, 1024);
        if(!baseaddr){
-
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