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 directly instead of taking this in a variable.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Minghao Chi <[email protected]>
Reported-by: Zeal Robot <[email protected]>
Cc: Christian Brauner <[email protected]>
Cc: Jan Kara <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Minghao Chi authored and torvalds committed Jan 20, 2022
1 parent 9bb56d5 commit 25d2e88
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 25d2e88

Please sign in to comment.