diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2011-12-28 15:55:42 +0200 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-01-09 18:26:09 +0000 |
commit | 10934478e44d9a5a7b16dadd89094fb608cf101e (patch) | |
tree | 603d4f5165fc032a28e5efaa872da685eea7bf32 /fs/jffs2/readinode.c | |
parent | fc002e3c320602d0e206f607aca0460540d7637a (diff) | |
download | blackbird-op-linux-10934478e44d9a5a7b16dadd89094fb608cf101e.tar.gz blackbird-op-linux-10934478e44d9a5a7b16dadd89094fb608cf101e.zip |
mtd: do use mtd->point directly
Remove direct usage of the "mtd->point" function pointer. Instead,
test the mtd_point() return code for '-EOPNOTSUPP'.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'fs/jffs2/readinode.c')
-rw-r--r-- | fs/jffs2/readinode.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c index fca2f84e1add..3093ac4fb24c 100644 --- a/fs/jffs2/readinode.c +++ b/fs/jffs2/readinode.c @@ -62,17 +62,15 @@ static int check_node_data(struct jffs2_sb_info *c, struct jffs2_tmp_dnode_info #ifndef __ECOS /* TODO: instead, incapsulate point() stuff to jffs2_flash_read(), * adding and jffs2_flash_read_end() interface. */ - if (c->mtd->point) { - err = mtd_point(c->mtd, ofs, len, &retlen, (void **)&buffer, - NULL); - if (!err && retlen < len) { - JFFS2_WARNING("MTD point returned len too short: %zu instead of %u.\n", retlen, tn->csize); - mtd_unpoint(c->mtd, ofs, retlen); - } else if (err) + err = mtd_point(c->mtd, ofs, len, &retlen, (void **)&buffer, NULL); + if (!err && retlen < len) { + JFFS2_WARNING("MTD point returned len too short: %zu instead of %u.\n", retlen, tn->csize); + mtd_unpoint(c->mtd, ofs, retlen); + } else if (err) { + if (err != -EOPNOTSUPP) JFFS2_WARNING("MTD point failed: error code %d.\n", err); - else - pointed = 1; /* succefully pointed to device */ - } + } else + pointed = 1; /* succefully pointed to device */ #endif if (!pointed) { |