diff options
Diffstat (limited to 'fs/jffs/jffs_fm.c')
-rw-r--r-- | fs/jffs/jffs_fm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/jffs/jffs_fm.c b/fs/jffs/jffs_fm.c index 077258b2103e..5a95fbdd6fdb 100644 --- a/fs/jffs/jffs_fm.c +++ b/fs/jffs/jffs_fm.c | |||
@@ -17,6 +17,7 @@ | |||
17 | * | 17 | * |
18 | */ | 18 | */ |
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/err.h> | ||
20 | #include <linux/blkdev.h> | 21 | #include <linux/blkdev.h> |
21 | #include <linux/jffs.h> | 22 | #include <linux/jffs.h> |
22 | #include "jffs_fm.h" | 23 | #include "jffs_fm.h" |
@@ -104,7 +105,7 @@ jffs_build_begin(struct jffs_control *c, int unit) | |||
104 | 105 | ||
105 | mtd = get_mtd_device(NULL, unit); | 106 | mtd = get_mtd_device(NULL, unit); |
106 | 107 | ||
107 | if (!mtd) { | 108 | if (IS_ERR(mtd)) { |
108 | kfree(fmc); | 109 | kfree(fmc); |
109 | DJM(no_jffs_fmcontrol--); | 110 | DJM(no_jffs_fmcontrol--); |
110 | return NULL; | 111 | return NULL; |