fs/adfs: remove unneeded variable make code cleaner
authorMinghao Chi <chi.minghao@zte.com.cn>
Thu, 20 Jan 2022 02:09:53 +0000 (18:09 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 20 Jan 2022 06:52:55 +0000 (08:52 +0200)
Return value directly instead of taking this in a variable.

Link: https://lkml.kernel.org/r/20211210023211.424609-1-chi.minghao@zte.com.cn
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Reported-by: Zeal Robot <zealci@zte.com.cm>
Cc: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/adfs/inode.c

index adbb3a1edcbf562269e896d38639f52ae14d2918..5156821bfe6a56d590409e388332fd7f928883e0 100644 (file)
@@ -355,7 +355,6 @@ int adfs_write_inode(struct inode *inode, struct writeback_control *wbc)
 {
        struct super_block *sb = inode->i_sb;
        struct object_info obj;
-       int ret;
 
        obj.indaddr     = ADFS_I(inode)->indaddr;
        obj.name_len    = 0;
@@ -365,6 +364,5 @@ int adfs_write_inode(struct inode *inode, struct writeback_control *wbc)
        obj.attr        = ADFS_I(inode)->attr;
        obj.size        = inode->i_size;
 
-       ret = adfs_dir_update(sb, &obj, wbc->sync_mode == WB_SYNC_ALL);
-       return ret;
+       return adfs_dir_update(sb, &obj, wbc->sync_mode == WB_SYNC_ALL);
 }