From: Heinrich Schuchardt Date: Thu, 12 Sep 2019 17:19:30 +0000 (+0200) Subject: fs: fat: get_contents() always returns -1 for errors X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=f13683816b9d0aada2546343d77bb87925505c46;p=u-boot.git 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 --- 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) {