diff options
| author | Stefano Babic <sbabic@denx.de> | 2013-09-13 12:04:54 +0200 |
|---|---|---|
| committer | Stefano Babic <sbabic@denx.de> | 2013-09-13 12:10:07 +0200 |
| commit | c4a7ece02046f647019cc0aaddf530833a8db29c (patch) | |
| tree | 06342cd9b8cc41b95442a992fb38a1bc8671b05c /fs/fat/fat_write.c | |
| parent | b5e7f1bc4b899ea34e838d5d60b3e6f8e479d0a9 (diff) | |
| parent | 8386ca8bea7a6a8469c3b6a99313afb642e6cbeb (diff) | |
| download | olio-uboot-2014.01-c4a7ece02046f647019cc0aaddf530833a8db29c.tar.xz olio-uboot-2014.01-c4a7ece02046f647019cc0aaddf530833a8db29c.zip | |
Merge branch 'master' of git://git.denx.de/u-boot-arm
Conflicts:
MAINTAINERS
boards.cfg
Signed-off-by: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'fs/fat/fat_write.c')
| -rw-r--r-- | fs/fat/fat_write.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c index b78026a81..b7a21e05b 100644 --- a/fs/fat/fat_write.c +++ b/fs/fat/fat_write.c @@ -552,9 +552,11 @@ set_cluster(fsdata *mydata, __u32 clustnum, __u8 *buffer, debug("clustnum: %d, startsect: %d\n", clustnum, startsect); - if (disk_write(startsect, size / mydata->sect_size, buffer) < 0) { - debug("Error writing data\n"); - return -1; + if ((size / mydata->sect_size) > 0) { + if (disk_write(startsect, size / mydata->sect_size, buffer) < 0) { + debug("Error writing data\n"); + return -1; + } } if (size % mydata->sect_size) { |