diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-09-12 19:19:30 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-10-11 19:05:14 -0400 |
commit | f13683816b9d0aada2546343d77bb87925505c46 (patch) | |
tree | a0e5aefcaead15b33f68ff16a08a324828cb57fe /fs | |
parent | c7a86d1645325697372b404f0b8cadac8a722ce9 (diff) |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/fat/fat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fat/fat.c b/fs/fat/fat.c index 2a5300d501..9e1b842dac 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -364,7 +364,7 @@ static int get_contents(fsdata *mydata, dir_entry *dentptr, loff_t pos, tmp_buffer = malloc_cache_aligned(actsize); if (!tmp_buffer) { debug("Error: allocating buffer\n"); - return -ENOMEM; + return -1; } if (get_cluster(mydata, curclust, tmp_buffer, actsize) != 0) { |