[PATCH] qnx6: delete unnecessary checks before brelse()

cgel.zte@gmail.com posted 1 patch 3 years, 7 months ago
fs/qnx6/super_mmi.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
[PATCH] qnx6: delete unnecessary checks before brelse()
Posted by cgel.zte@gmail.com 3 years, 7 months ago
From: Minghao Chi <chi.minghao@zte.com.cn>

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>
---
 fs/qnx6/super_mmi.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/qnx6/super_mmi.c b/fs/qnx6/super_mmi.c
index d282c2c73404..26854f1356d6 100644
--- a/fs/qnx6/super_mmi.c
+++ b/fs/qnx6/super_mmi.c
@@ -141,9 +141,7 @@ struct qnx6_super_block *qnx6_mmi_fill_super(struct super_block *s, int silent)
 	return sbi->sb;
 
 out:
-	if (bh1 != NULL)
-		brelse(bh1);
-	if (bh2 != NULL)
-		brelse(bh2);
+	brelse(bh1);
+	brelse(bh2);
 	return NULL;
 }
-- 
2.25.1