aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jffs2/super.c')
-rw-r--r--fs/jffs2/super.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c
index 2378a662c256..6de374513c01 100644
--- a/fs/jffs2/super.c
+++ b/fs/jffs2/super.c
@@ -11,7 +11,6 @@
11 * 11 *
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/slab.h> 16#include <linux/slab.h>
@@ -120,10 +119,9 @@ static int jffs2_get_sb_mtd(struct file_system_type *fs_type,
120 struct jffs2_sb_info *c; 119 struct jffs2_sb_info *c;
121 int ret; 120 int ret;
122 121
123 c = kmalloc(sizeof(*c), GFP_KERNEL); 122 c = kzalloc(sizeof(*c), GFP_KERNEL);
124 if (!c) 123 if (!c)
125 return -ENOMEM; 124 return -ENOMEM;
126 memset(c, 0, sizeof(*c));
127 c->mtd = mtd; 125 c->mtd = mtd;
128 126
129 sb = sget(fs_type, jffs2_sb_compare, jffs2_sb_set, c); 127 sb = sget(fs_type, jffs2_sb_compare, jffs2_sb_set, c);