aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs/jffs_fm.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jffs/jffs_fm.c')
-rw-r--r--fs/jffs/jffs_fm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/jffs/jffs_fm.c b/fs/jffs/jffs_fm.c
index 7d8ca1aeace2..29b68d939bd9 100644
--- a/fs/jffs/jffs_fm.c
+++ b/fs/jffs/jffs_fm.c
@@ -94,8 +94,7 @@ jffs_build_begin(struct jffs_control *c, int unit)
94 struct mtd_info *mtd; 94 struct mtd_info *mtd;
95 95
96 D3(printk("jffs_build_begin()\n")); 96 D3(printk("jffs_build_begin()\n"));
97 fmc = (struct jffs_fmcontrol *)kmalloc(sizeof(struct jffs_fmcontrol), 97 fmc = kmalloc(sizeof(*fmc), GFP_KERNEL);
98 GFP_KERNEL);
99 if (!fmc) { 98 if (!fmc) {
100 D(printk("jffs_build_begin(): Allocation of " 99 D(printk("jffs_build_begin(): Allocation of "
101 "struct jffs_fmcontrol failed!\n")); 100 "struct jffs_fmcontrol failed!\n"));
@@ -486,8 +485,7 @@ jffs_add_node(struct jffs_node *node)
486 485
487 D3(printk("jffs_add_node(): ino = %u\n", node->ino)); 486 D3(printk("jffs_add_node(): ino = %u\n", node->ino));
488 487
489 ref = (struct jffs_node_ref *)kmalloc(sizeof(struct jffs_node_ref), 488 ref = kmalloc(sizeof(*ref), GFP_KERNEL);
490 GFP_KERNEL);
491 if (!ref) 489 if (!ref)
492 return -ENOMEM; 490 return -ENOMEM;
493 491