Skip to content
Snippets Groups Projects
Commit 42a9f147 authored by Tom Rini's avatar Tom Rini
Browse files

fs/fat: Correct blk_dread() return value check


The function blk_dread will return -ENOSYS on failure or on success the
number of blocks read, which must be the number asked to read (otherwise
it failed somewhere).  Correct this check.

Signed-off-by: default avatarTom Rini <trini@konsulko.com>
parent 9585dd3f
No related branches found
No related tags found
No related merge requests found
...@@ -54,7 +54,7 @@ static int disk_read(__u32 block, __u32 nr_blocks, void *buf) ...@@ -54,7 +54,7 @@ static int disk_read(__u32 block, __u32 nr_blocks, void *buf)
ret = blk_dread(cur_dev, cur_part_info.start + block, nr_blocks, buf); ret = blk_dread(cur_dev, cur_part_info.start + block, nr_blocks, buf);
if (nr_blocks && ret == 0) if (ret != nr_blocks)
return -1; return -1;
return ret; return ret;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment