提交 d4d361ad 编写于 作者: M Minghao Chi 提交者: Jan Kara

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: NZeal Robot <zealci@zte.com.cn>
Signed-off-by: NMinghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: NJan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20220819081420.96209-1-chi.minghao@zte.com.cn
上级 e03d3b1b
...@@ -1277,13 +1277,11 @@ static int isofs_read_level3_size(struct inode *inode) ...@@ -1277,13 +1277,11 @@ static int isofs_read_level3_size(struct inode *inode)
} while (more_entries); } while (more_entries);
out: out:
kfree(tmpde); kfree(tmpde);
if (bh) brelse(bh);
brelse(bh);
return 0; return 0;
out_nomem: out_nomem:
if (bh) brelse(bh);
brelse(bh);
return -ENOMEM; return -ENOMEM;
out_noread: out_noread:
...@@ -1486,8 +1484,7 @@ static int isofs_read_inode(struct inode *inode, int relocated) ...@@ -1486,8 +1484,7 @@ static int isofs_read_inode(struct inode *inode, int relocated)
ret = 0; ret = 0;
out: out:
kfree(tmpde); kfree(tmpde);
if (bh) brelse(bh);
brelse(bh);
return ret; return ret;
out_badread: out_badread:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册