Commit d4d361ad authored by Minghao Chi's avatar Minghao Chi Committed by Jan Kara
Browse files

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: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarMinghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20220819081420.96209-1-chi.minghao@zte.com.cn
parent e03d3b1b
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -1277,12 +1277,10 @@ static int isofs_read_level3_size(struct inode *inode)
	} while (more_entries);
out:
	kfree(tmpde);
	if (bh)
	brelse(bh);
	return 0;

out_nomem:
	if (bh)
	brelse(bh);
	return -ENOMEM;

@@ -1486,7 +1484,6 @@ static int isofs_read_inode(struct inode *inode, int relocated)
	ret = 0;
out:
	kfree(tmpde);
	if (bh)
	brelse(bh);
	return ret;