Skip to contentSkip to conversation

fs/qnx6: delete unnecessary checks before brelse()

PATCH Applied [email protected] 1 participant 1 message Aug 19, 2022 QNX6 filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/qnx6: delete unnecessary checks before brelse()

From: Minghao Chi <[email protected]>

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.

---
 fs/qnx6/inode.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
fs/qnx6/inode.c +2 -4
index b9895afca9d1..85b2fa3b211c 100644
@@ -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;
Signature · 1 line
2.25.1