Skip to content

Commit

Permalink
[JFFS2] Fix return value check for mtd->point() in check_node_data()
Browse files Browse the repository at this point in the history
If we ask it to map 'len' bytes of the device, don't compare against 
some other number and whine that it's different. That's a little silly.

Signed-off-by: Alexey Korolev <akorolev@infradead.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
  • Loading branch information
Alexey Korolev authored and David Woodhouse committed Nov 28, 2007
1 parent 6c24e41 commit c2056e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/jffs2/readinode.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static int check_node_data(struct jffs2_sb_info *c, struct jffs2_tmp_dnode_info
* adding and jffs2_flash_read_end() interface. */
if (c->mtd->point) {
err = c->mtd->point(c->mtd, ofs, len, &retlen, &buffer);
if (!err && retlen < tn->csize) {
if (!err && retlen < len) {
JFFS2_WARNING("MTD point returned len too short: %zu instead of %u.\n", retlen, tn->csize);
c->mtd->unpoint(c->mtd, buffer, ofs, retlen);
} else if (err)
Expand Down

0 comments on commit c2056e1

Please sign in to comment.