summaryrefslogtreecommitdiff
path: root/fs/fat/fat.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2021-01-26 02:14:14 +0300
committerTom Rini <trini@konsulko.com>2021-01-29 18:36:48 +0300
commit84ca3055f0e6ae9c7d1434fac037bd6b8af1e8c9 (patch)
tree940c432c78c4cdbdaa3fbde6083add174e62a7f9 /fs/fat/fat.c
parent41ac28c67272d99836aebb840e5ab94b3ae14023 (diff)
downloadu-boot-84ca3055f0e6ae9c7d1434fac037bd6b8af1e8c9.tar.xz
fs: fat: remove superfluous assignments
Do not assign a value to a variable if it is not used. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'fs/fat/fat.c')
-rw-r--r--fs/fat/fat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/fat/fat.c b/fs/fat/fat.c
index fb6ce094ac..ccba268f61 100644
--- a/fs/fat/fat.c
+++ b/fs/fat/fat.c
@@ -248,7 +248,6 @@ static __u32 get_fatent(fsdata *mydata, __u32 entry)
static int
get_cluster(fsdata *mydata, __u32 clustnum, __u8 *buffer, unsigned long size)
{
- __u32 idx = 0;
__u32 startsect;
int ret;
@@ -277,6 +276,8 @@ get_cluster(fsdata *mydata, __u32 clustnum, __u8 *buffer, unsigned long size)
size -= mydata->sect_size;
}
} else {
+ __u32 idx;
+
idx = size / mydata->sect_size;
if (idx == 0)
ret = 0;