projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9585dd3
)
fs/fat: Correct blk_dread() return value check
author
Tom Rini
<trini@konsulko.com>
Tue, 15 Aug 2017 01:02:08 +0000
(21:02 -0400)
committer
Tom Rini
<trini@konsulko.com>
Sun, 20 Aug 2017 13:54:31 +0000
(09:54 -0400)
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: Tom Rini <trini@konsulko.com>
fs/fat/fat.c
patch
|
blob
|
history
diff --git
a/fs/fat/fat.c
b/fs/fat/fat.c
index
9ad18f9
..
465a687
100644
(file)
--- a/
fs/fat/fat.c
+++ b/
fs/fat/fat.c
@@
-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);
- if (
nr_blocks && ret == 0
)
+ if (
ret != nr_blocks
)
return -1;
return ret;