diff options
Diffstat (limited to 'fs/logfs/dev_mtd.c')
-rw-r--r-- | fs/logfs/dev_mtd.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/logfs/dev_mtd.c b/fs/logfs/dev_mtd.c index 7b22d57d1469..9e3dbe3712ae 100644 --- a/fs/logfs/dev_mtd.c +++ b/fs/logfs/dev_mtd.c | |||
@@ -265,18 +265,14 @@ static const struct logfs_device_ops mtd_devops = { | |||
265 | .put_device = mtd_put_device, | 265 | .put_device = mtd_put_device, |
266 | }; | 266 | }; |
267 | 267 | ||
268 | int logfs_get_sb_mtd(struct logfs_super *s, | 268 | int logfs_get_sb_mtd(struct logfs_super *s, int mtdnr) |
269 | struct file_system_type *type, int flags, | ||
270 | int mtdnr, struct vfsmount *mnt) | ||
271 | { | 269 | { |
272 | struct mtd_info *mtd = get_mtd_device(NULL, mtdnr); | 270 | struct mtd_info *mtd = get_mtd_device(NULL, mtdnr); |
273 | if (IS_ERR(mtd)) { | 271 | if (IS_ERR(mtd)) |
274 | kfree(s); | ||
275 | return PTR_ERR(mtd); | 272 | return PTR_ERR(mtd); |
276 | } | ||
277 | 273 | ||
278 | s->s_bdev = NULL; | 274 | s->s_bdev = NULL; |
279 | s->s_mtd = mtd; | 275 | s->s_mtd = mtd; |
280 | s->s_devops = &mtd_devops; | 276 | s->s_devops = &mtd_devops; |
281 | return logfs_get_sb_device(s, type, flags, mnt); | 277 | return 0; |
282 | } | 278 | } |