diff options
Diffstat (limited to 'fs/logfs/dev_mtd.c')
-rw-r--r-- | fs/logfs/dev_mtd.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/logfs/dev_mtd.c b/fs/logfs/dev_mtd.c index a85d47d13e4b..e886cdcf9d7e 100644 --- a/fs/logfs/dev_mtd.c +++ b/fs/logfs/dev_mtd.c | |||
@@ -265,14 +265,17 @@ 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 file_system_type *type, int flags, | 268 | int logfs_get_sb_mtd(struct logfs_super *s, |
269 | struct file_system_type *type, int flags, | ||
269 | int mtdnr, struct vfsmount *mnt) | 270 | int mtdnr, struct vfsmount *mnt) |
270 | { | 271 | { |
271 | struct mtd_info *mtd; | 272 | struct mtd_info *mtd; |
272 | const struct logfs_device_ops *devops = &mtd_devops; | 273 | const struct logfs_device_ops *devops = &mtd_devops; |
273 | 274 | ||
274 | mtd = get_mtd_device(NULL, mtdnr); | 275 | mtd = get_mtd_device(NULL, mtdnr); |
275 | if (IS_ERR(mtd)) | 276 | if (IS_ERR(mtd)) { |
277 | kfree(s); | ||
276 | return PTR_ERR(mtd); | 278 | return PTR_ERR(mtd); |
277 | return logfs_get_sb_device(type, flags, mtd, NULL, devops, mnt); | 279 | } |
280 | return logfs_get_sb_device(s, type, flags, mtd, NULL, devops, mnt); | ||
278 | } | 281 | } |