From ecd16aaf9c142de0819b8fb00fac41babd5a7216 Mon Sep 17 00:00:00 2001 From: Christophe Vu-Brugier Date: Wed, 3 Nov 2021 10:35:22 +0900 Subject: [PATCH] exfat: simplify is_valid_cluster() Simplify is_valid_cluster(). Signed-off-by: Christophe Vu-Brugier Signed-off-by: Namjae Jeon --- fatent.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fatent.c b/fatent.c index c0a9cc9ac6e2..ca725516972f 100644 --- a/fatent.c +++ b/fatent.c @@ -92,9 +92,7 @@ int exfat_ent_set(struct super_block *sb, unsigned int loc, static inline bool is_valid_cluster(struct exfat_sb_info *sbi, unsigned int clus) { - if (clus < EXFAT_FIRST_CLUSTER || sbi->num_clusters <= clus) - return false; - return true; + return clus >= EXFAT_FIRST_CLUSTER && clus < sbi->num_clusters; } int exfat_ent_get(struct super_block *sb, unsigned int loc,