From b4c7b606e95eae460cdec959d9db09fc50b3b2a4 Mon Sep 17 00:00:00 2001 From: Praveenkumar I Date: Mon, 28 Mar 2022 16:04:25 +0530 Subject: [PATCH] fs/fat/fat_write: Fix return value on flush_fat_buffer() failure Change-Id: I6e0440e8878b33c20e757df095ab0784a01a444c Signed-off-by: Praveenkumar I --- fs/fat/fat_write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c index d087f6ca9e..41759079db 100644 --- a/fs/fat/fat_write.c +++ b/fs/fat/fat_write.c @@ -191,7 +191,7 @@ static __u32 get_fatent_value(fsdata *mydata, __u32 entry) /* Write back the fatbuf to the disk */ if (mydata->fatbufnum != -1) { if (flush_fat_buffer(mydata) < 0) - return -1; + return ret; } if (disk_read(startblock, getsize, bufptr) < 0) {