Skip to content

Commit

Permalink
fs/qnx6: delete unnecessary checks before brelse()
Browse files Browse the repository at this point in the history
brelse() tests whether its argument is NULL and then returns immediately. 
Thus remove the tests which are not needed around the shown calls.

Link: https://lkml.kernel.org/r/20220819081819.96347-1-chi.minghao@zte.com.cn
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Reported-by: Zeal Robot <zealci@zte.com.cn>
Cc: CGEL ZTE <cgel.zte@gmail.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Minghao Chi <chi.minghao@zte.com.cn>
Cc: Muchun Song <songmuchun@bytedance.com>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
Minghao Chi authored and Andrew Morton committed Sep 12, 2022
1 parent 2be9880 commit cba7543
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fs/qnx6/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,10 +470,8 @@ static int qnx6_fill_super(struct super_block *s, void *data, int silent)
out1:
iput(sbi->inodes);
out:
if (bh1)
brelse(bh1);
if (bh2)
brelse(bh2);
brelse(bh1);
brelse(bh2);
outnobh:
kfree(qs);
s->s_fs_info = NULL;
Expand Down

0 comments on commit cba7543

Please sign in to comment.