mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 21:21:41 +00:00
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
This commit is contained in:
parent
e03d3b1b92
commit
d4d361ad00
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user