aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mtd/mtdsuper.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/mtdsuper.c b/drivers/mtd/mtdsuper.c
index a279540ba87a..aca331971201 100644
--- a/drivers/mtd/mtdsuper.c
+++ b/drivers/mtd/mtdsuper.c
@@ -106,9 +106,9 @@ static int get_sb_mtd_nr(struct file_system_type *fs_type, int flags,
106 struct mtd_info *mtd; 106 struct mtd_info *mtd;
107 107
108 mtd = get_mtd_device(NULL, mtdnr); 108 mtd = get_mtd_device(NULL, mtdnr);
109 if (!mtd) { 109 if (IS_ERR(mtd)) {
110 DEBUG(0, "MTDSB: Device #%u doesn't appear to exist\n", mtdnr); 110 DEBUG(0, "MTDSB: Device #%u doesn't appear to exist\n", mtdnr);
111 return -EINVAL; 111 return PTR_ERR(mtd);
112 } 112 }
113 113
114 return get_sb_mtd_aux(fs_type, flags, dev_name, data, mtd, fill_super, 114 return get_sb_mtd_aux(fs_type, flags, dev_name, data, mtd, fill_super,
@@ -145,7 +145,7 @@ int get_sb_mtd(struct file_system_type *fs_type, int flags,
145 145
146 for (mtdnr = 0; mtdnr < MAX_MTD_DEVICES; mtdnr++) { 146 for (mtdnr = 0; mtdnr < MAX_MTD_DEVICES; mtdnr++) {
147 mtd = get_mtd_device(NULL, mtdnr); 147 mtd = get_mtd_device(NULL, mtdnr);
148 if (mtd) { 148 if (!IS_ERR(mtd)) {
149 if (!strcmp(mtd->name, dev_name + 4)) 149 if (!strcmp(mtd->name, dev_name + 4))
150 return get_sb_mtd_aux( 150 return get_sb_mtd_aux(
151 fs_type, flags, 151 fs_type, flags,