OSDN Git Service

staging: exfat: Clean up return codes - FFS_INVALIDFID
authorValdis Kletnieks <valdis.kletnieks@vt.edu>
Tue, 12 Nov 2019 02:09:52 +0000 (21:09 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Nov 2019 23:13:55 +0000 (00:13 +0100)
Covert FFS_INVALIDFID to -EINVAL

Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Link: https://lore.kernel.org/r/20191112021000.42091-5-Valdis.Kletnieks@vt.edu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/exfat/exfat.h
drivers/staging/exfat/exfat_super.c

index 292af85..7a81740 100644 (file)
@@ -214,7 +214,6 @@ static inline u16 get_row_index(u16 i)
 #define FFS_NOTMOUNTED          4
 #define FFS_ALIGNMENTERR        5
 #define FFS_SEMAPHOREERR        6
-#define FFS_INVALIDFID          8
 #define FFS_NOTOPENED           12
 #define FFS_MAXOPENED           13
 #define FFS_ERROR               19
index 77e00d0..a9129b5 100644 (file)
@@ -699,7 +699,7 @@ static int ffsReadFile(struct inode *inode, struct file_id_t *fid, void *buffer,
 
        /* check the validity of the given file id */
        if (!fid)
-               return FFS_INVALIDFID;
+               return -EINVAL;
 
        /* check the validity of pointer parameters */
        if (!buffer)
@@ -831,7 +831,7 @@ static int ffsWriteFile(struct inode *inode, struct file_id_t *fid,
 
        /* check the validity of the given file id */
        if (!fid)
-               return FFS_INVALIDFID;
+               return -EINVAL;
 
        /* check the validity of pointer parameters */
        if (!buffer)
@@ -1237,7 +1237,7 @@ static int ffsMoveFile(struct inode *old_parent_inode, struct file_id_t *fid,
 
        /* check the validity of the given file id */
        if (!fid)
-               return FFS_INVALIDFID;
+               return -EINVAL;
 
        /* check the validity of pointer parameters */
        if (!new_path || (*new_path == '\0'))
@@ -1358,7 +1358,7 @@ static int ffsRemoveFile(struct inode *inode, struct file_id_t *fid)
 
        /* check the validity of the given file id */
        if (!fid)
-               return FFS_INVALIDFID;
+               return -EINVAL;
 
        /* acquire the lock for file system critical section */
        mutex_lock(&p_fs->v_mutex);
@@ -2145,7 +2145,7 @@ static int ffsRemoveDir(struct inode *inode, struct file_id_t *fid)
 
        /* check the validity of the given file id */
        if (!fid)
-               return FFS_INVALIDFID;
+               return -EINVAL;
 
        dir.dir = fid->dir.dir;
        dir.size = fid->dir.size;