From af4c5246b07ed4a87324df00983aefbbe30be837 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 1 Nov 2013 11:49:13 -0600 Subject: [PATCH] FAT: Fix error return value. In one failure case, success was being returned --- ChangeLog | 4 +++- fs/fat/fs_fat32util.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7fc88ace491..7b6d5a05d59 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5935,4 +5935,6 @@ stacks as well as the heap. Suggested by David Sidrane (2013-11-1). * configs/spark/usbmsc: Add spark USB MSC configuration. From David Sidrane (2013-11-1). - + * fs/fat/fs_fat32util.c: In one error return case, the error return + value was not being set, making the failure look like success. From + David Sidrane (2011-10-1). diff --git a/fs/fat/fs_fat32util.c b/fs/fat/fs_fat32util.c index cfacc643eaf..227fa5ceaa5 100644 --- a/fs/fat/fs_fat32util.c +++ b/fs/fat/fs_fat32util.c @@ -630,6 +630,7 @@ int fat_mount(struct fat_mountpt_s *fs, bool writeable) if (i > 3) { fdbg("No valid MBR\n"); + ret = -EINVAL; goto errout_with_buffer; } }