Skip to content

Commit

Permalink
fs/adfs: remove unneeded variable make code cleaner
Browse files Browse the repository at this point in the history
return value form directly instead of
taking this in another redundant 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: Stephen Rothwell <sfr@canb.auug.org.au>
  • Loading branch information
Minghao Chi authored and Stephen Rothwell committed Jan 4, 2022
1 parent f6c4d92 commit 388ce35
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fs/adfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}

0 comments on commit 388ce35

Please sign in to comment.