summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-11-01 11:49:13 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-11-01 11:49:13 -0600
commit503465b0396de47e160d0ab9e0366841ee8935f2 (patch)
treec9d93d977649528006a68657823afdc82806b67a
parent784a1b859e78a26c87c880f8e9f01997489ad249 (diff)
downloadnuttx-503465b0396de47e160d0ab9e0366841ee8935f2.tar.gz
nuttx-503465b0396de47e160d0ab9e0366841ee8935f2.tar.bz2
nuttx-503465b0396de47e160d0ab9e0366841ee8935f2.zip
FAT: Fix error return value. In one failure case, success was being returned
-rw-r--r--nuttx/ChangeLog4
-rw-r--r--nuttx/fs/fat/fs_fat32util.c1
2 files changed, 4 insertions, 1 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index 7fc88ace4..7b6d5a05d 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/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/nuttx/fs/fat/fs_fat32util.c b/nuttx/fs/fat/fs_fat32util.c
index cfacc643e..227fa5cea 100644
--- a/nuttx/fs/fat/fs_fat32util.c
+++ b/nuttx/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;
}
}