summaryrefslogtreecommitdiff
path: root/fs/btrfs/relocation.c
diff options
context:
space:
mode:
authorLv Ruyi <lv.ruyi@zte.com.cn>2022-04-11 06:22:52 +0300
committerDavid Sterba <dsterba@suse.com>2022-05-16 18:03:12 +0300
commit8aa1e49ea1fdcc585be4bcfe8c62684a087cc7c6 (patch)
tree2002f72f5c12d51ed9c13a1cdf2cb626adf5ac40 /fs/btrfs/relocation.c
parentb027669449390ed549579f0a838c2de6a037dea6 (diff)
downloadlinux-8aa1e49ea1fdcc585be4bcfe8c62684a087cc7c6.tar.xz
btrfs: remove unnecessary check of iput argument
iput() already handles NULL and non-NULL parameter, so it is not needed to check that. This unifies all iput calls. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/relocation.c')
-rw-r--r--fs/btrfs/relocation.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index 50bdd82682fa..edddd93d2118 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -3846,8 +3846,7 @@ out:
btrfs_end_transaction(trans);
btrfs_btree_balance_dirty(fs_info);
if (err) {
- if (inode)
- iput(inode);
+ iput(inode);
inode = ERR_PTR(err);
}
return inode;