[PATCH] fs: Removing useless casts
[pandora-kernel.git] / fs / jffs / jffs_fm.c
index 7d8ca1a..29b68d9 100644 (file)
@@ -94,8 +94,7 @@ jffs_build_begin(struct jffs_control *c, int unit)
        struct mtd_info *mtd;
        
        D3(printk("jffs_build_begin()\n"));
-       fmc = (struct jffs_fmcontrol *)kmalloc(sizeof(struct jffs_fmcontrol),
-                                              GFP_KERNEL);
+       fmc = kmalloc(sizeof(*fmc), GFP_KERNEL);
        if (!fmc) {
                D(printk("jffs_build_begin(): Allocation of "
                         "struct jffs_fmcontrol failed!\n"));
@@ -486,8 +485,7 @@ jffs_add_node(struct jffs_node *node)
 
        D3(printk("jffs_add_node(): ino = %u\n", node->ino));
 
-       ref = (struct jffs_node_ref *)kmalloc(sizeof(struct jffs_node_ref),
-                                             GFP_KERNEL);
+       ref = kmalloc(sizeof(*ref), GFP_KERNEL);
        if (!ref)
                return -ENOMEM;