Skip to content

Commit

Permalink
staging: exfat: Clean up return codes - FFS_NOTFOUND
Browse files Browse the repository at this point in the history
Convert FFS_NOTFOUND to -ENOENT

Signed-off-by: Valdis Kletnieks <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
valdisk authored and gregkh committed Oct 25, 2019
1 parent 2f2e288 commit 67f8224
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion drivers/staging/exfat/exfat.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ static inline u16 get_row_index(u16 i)
#define FFS_SEMAPHOREERR 6
#define FFS_INVALIDPATH 7
#define FFS_INVALIDFID 8
#define FFS_NOTFOUND 9
#define FFS_FILEEXIST 10
#define FFS_PERMISSIONERR 11
#define FFS_NOTOPENED 12
Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/exfat/exfat_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ static int ffsLookupFile(struct inode *inode, char *path, struct file_id_t *fid)
dentry = p_fs->fs_func->find_dir_entry(sb, &dir, &uni_name, num_entries,
&dos_name, TYPE_ALL);
if (dentry < -1) {
ret = FFS_NOTFOUND;
ret = -ENOENT;
goto out;
}

Expand Down Expand Up @@ -2701,7 +2701,7 @@ static int exfat_rmdir(struct inode *dir, struct dentry *dentry)
err = -EINVAL;
else if (err == FFS_FILEEXIST)
err = -ENOTEMPTY;
else if (err == FFS_NOTFOUND)
else if (err == -ENOENT)
err = -ENOENT;
else if (err == FFS_DIRBUSY)
err = -EBUSY;
Expand Down Expand Up @@ -2758,7 +2758,7 @@ static int exfat_rename(struct inode *old_dir, struct dentry *old_dentry,
err = -EINVAL;
else if (err == FFS_FILEEXIST)
err = -EEXIST;
else if (err == FFS_NOTFOUND)
else if (err == -ENOENT)
err = -ENOENT;
else if (err == -ENOSPC)
err = -ENOSPC;
Expand Down

0 comments on commit 67f8224

Please sign in to comment.