summaryrefslogtreecommitdiff
path: root/fs/fat
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fat')
-rw-r--r--fs/fat/Kconfig2
-rw-r--r--fs/fat/fat.c2
-rw-r--r--fs/fat/fat_write.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/fs/fat/Kconfig b/fs/fat/Kconfig
index 9606fa48bbe..aa121844844 100644
--- a/fs/fat/Kconfig
+++ b/fs/fat/Kconfig
@@ -36,4 +36,4 @@ config FS_FAT_HANDLE_SECTOR_SIZE_MISMATCH
depends on FS_FAT
help
Handle filesystems on media where the hardware block size and
- the sector size in the FAT metadata do not match.
+ the sector size in the FAT metadata do not match.
diff --git a/fs/fat/fat.c b/fs/fat/fat.c
index 31c136e3b9e..c1ccf30771a 100644
--- a/fs/fat/fat.c
+++ b/fs/fat/fat.c
@@ -71,7 +71,7 @@ static inline __u32 sect_to_block(__u32 sect, __u32 *off)
static int disk_rw(__u32 sect, __u32 nr_sect, void *buf, bool read)
{
- int ret;
+ int ret = 0;
__u8 *block = NULL;
__u32 rem, size, s, n;
const ulong blksz = cur_part_info.blksz;
diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c
index c98b530f747..a1d28b4e305 100644
--- a/fs/fat/fat_write.c
+++ b/fs/fat/fat_write.c
@@ -1175,9 +1175,9 @@ static void dentry_set_time(dir_entry *dentptr)
date = (tm.tm_mday & 0x1f) |
((tm.tm_mon & 0xf) << 5) |
((tm.tm_year - 1980) << 9);
- time = (tm.tm_sec > 1) |
+ time = (tm.tm_sec >> 1) |
((tm.tm_min & 0x3f) << 5) |
- (tm.tm_hour << 11);
+ (tm.tm_hour << 11);
dentptr->date = date;
dentptr->time = time;
return;