mirror of
https://xff.cz/git/u-boot/
synced 2025-09-04 02:02:08 +02:00
fs: fat: get_contents() always returns -1 for errors
If out of memory, return -1 and not -ENOMEM from get_contents(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
committed by
Tom Rini
parent
c7a86d1645
commit
f13683816b
@@ -364,7 +364,7 @@ static int get_contents(fsdata *mydata, dir_entry *dentptr, loff_t pos,
|
|||||||
tmp_buffer = malloc_cache_aligned(actsize);
|
tmp_buffer = malloc_cache_aligned(actsize);
|
||||||
if (!tmp_buffer) {
|
if (!tmp_buffer) {
|
||||||
debug("Error: allocating buffer\n");
|
debug("Error: allocating buffer\n");
|
||||||
return -ENOMEM;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (get_cluster(mydata, curclust, tmp_buffer, actsize) != 0) {
|
if (get_cluster(mydata, curclust, tmp_buffer, actsize) != 0) {
|
||||||
|
Reference in New Issue
Block a user