Skip to content

Commit 8ffe56b

Browse files
ISCAS-Vulabnamjaejeon
authored andcommitted
exfat: improve error code handling in exfat_find_empty_entry()
Change the type of 'ret' from unsigned int to int in exfat_find_empty_entry(). Although the implicit type conversion (int -> unsigned int -> int) does not cause actual bugs in practice, using int directly is more appropriate for storing error codes returned by exfat_alloc_cluster(). This improves code clarity and consistency with standard error handling practices. Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn> Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
1 parent 37a93dd commit 8ffe56b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

fs/exfat/namei.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,8 @@ int exfat_find_empty_entry(struct inode *inode,
304304
struct exfat_chain *p_dir, int num_entries,
305305
struct exfat_entry_set_cache *es)
306306
{
307-
int dentry;
308-
unsigned int ret, last_clu;
307+
int dentry, ret;
308+
unsigned int last_clu;
309309
loff_t size = 0;
310310
struct exfat_chain clu;
311311
struct super_block *sb = inode->i_sb;

0 commit comments

Comments
 (0)