aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMinghao Chi <chi.minghao@zte.com.cn>2022-08-19 08:14:20 +0000
committerJan Kara <jack@suse.cz>2022-08-19 11:06:18 +0200
commitd4d361ad00bac10701a8c14d8e1a2967bd2e2813 (patch)
tree04747d2df6e3d9df8d0e20cb410af30d43a59de6
parentfs/reiserfs: replace ternary operator with min() and min_t() (diff)
downloadlinux-dev-d4d361ad00bac10701a8c14d8e1a2967bd2e2813.tar.xz
linux-dev-d4d361ad00bac10701a8c14d8e1a2967bd2e2813.zip
isofs: delete unnecessary checks before brelse()
The brelse() function tests whether its argument is NULL and then returns immediately. Thus remove the tests which are not needed around the shown calls. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20220819081420.96209-1-chi.minghao@zte.com.cn
-rw-r--r--fs/isofs/inode.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c
index 88bf20303466..df9d70588b60 100644
--- a/fs/isofs/inode.c
+++ b/fs/isofs/inode.c
@@ -1277,13 +1277,11 @@ static int isofs_read_level3_size(struct inode *inode)
} while (more_entries);
out:
kfree(tmpde);
- if (bh)
- brelse(bh);
+ brelse(bh);
return 0;
out_nomem:
- if (bh)
- brelse(bh);
+ brelse(bh);
return -ENOMEM;
out_noread:
@@ -1486,8 +1484,7 @@ static int isofs_read_inode(struct inode *inode, int relocated)
ret = 0;
out:
kfree(tmpde);
- if (bh)
- brelse(bh);
+ brelse(bh);
return ret;
out_badread: