From: Egbert Eich Date: Tue, 9 Apr 2013 21:11:55 +0000 (+0000) Subject: fs/fat: Don't multiply fatsize with sector size X-Git-Tag: v2013.07-rc1~18^2~15 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bc8d98713f10582f4e35b9208f1b967c6a9f9953;p=u-boot fs/fat: Don't multiply fatsize with sector size Bugfix: Here at this place we need the fat size in sectors not bytes. This was found during code review when adding support for storage devices with blocksizes != 512. Signed-off-by: Egbert Eich --- diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c index b4022aa290..fd07240daa 100644 --- a/fs/fat/fat_write.c +++ b/fs/fat/fat_write.c @@ -120,7 +120,6 @@ static int flush_fat_buffer(fsdata *mydata) __u8 *bufptr = mydata->fatbuf; __u32 startblock = mydata->fatbufnum * FATBUFBLOCKS; - fatlength *= mydata->sect_size; startblock += mydata->fat_sect; if (getsize > fatlength)