Skip to content

Commit f026545

Browse files
dedekindDavid Woodhouse
authored andcommitted
jffs2: remove direct mtd->point reference
Commit 1093447 did not remove now useless "if (mtd->point)" check mistakingly - let's kill it now. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
1 parent 570469f commit f026545

1 file changed

Lines changed: 9 additions & 11 deletions

File tree

‎fs/jffs2/scan.c‎

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -96,18 +96,16 @@ int jffs2_scan_medium(struct jffs2_sb_info *c)
9696
#ifndef __ECOS
9797
size_t pointlen, try_size;
9898

99-
if (c->mtd->point) {
100-
ret = mtd_point(c->mtd, 0, c->mtd->size, &pointlen,
101-
(void **)&flashbuf, NULL);
102-
if (!ret && pointlen < c->mtd->size) {
103-
/* Don't muck about if it won't let us point to the whole flash */
104-
D1(printk(KERN_DEBUG "MTD point returned len too short: 0x%zx\n", pointlen));
105-
mtd_unpoint(c->mtd, 0, pointlen);
106-
flashbuf = NULL;
107-
}
108-
if (ret && ret != -EOPNOTSUPP)
109-
D1(printk(KERN_DEBUG "MTD point failed %d\n", ret));
99+
ret = mtd_point(c->mtd, 0, c->mtd->size, &pointlen,
100+
(void **)&flashbuf, NULL);
101+
if (!ret && pointlen < c->mtd->size) {
102+
/* Don't muck about if it won't let us point to the whole flash */
103+
D1(printk(KERN_DEBUG "MTD point returned len too short: 0x%zx\n", pointlen));
104+
mtd_unpoint(c->mtd, 0, pointlen);
105+
flashbuf = NULL;
110106
}
107+
if (ret && ret != -EOPNOTSUPP)
108+
D1(printk(KERN_DEBUG "MTD point failed %d\n", ret));
111109
#endif
112110
if (!flashbuf) {
113111
/* For NAND it's quicker to read a whole eraseblock at a time,

0 commit comments

Comments
 (0)