Skip to contentSkip to conversation

reiserfs: Delete an unnecessary check before brelse()

PATCH New Markus Elfring 1 participant 1 message Sep 3, 2019 Kernel janitors

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 reiserfs: Delete an unnecessary check before brelse()

From: Markus Elfring <[email protected]>
Date: Tue, 3 Sep 2019 20:00:16 +0200

The brelse() function tests whether its argument is NULL and then returns immediately.
Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

---
 fs/reiserfs/super.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/reiserfs/super.c +1 -2
index d69b4ac0ae2f..b412ef9a24a6 100644
@@ -2229,8 +2229,7 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
 	reiserfs_cancel_old_flush(s);
 
 	reiserfs_free_bitmap_cache(s);
-	if (SB_BUFFER_WITH_SB(s))
-		brelse(SB_BUFFER_WITH_SB(s));
+	brelse(SB_BUFFER_WITH_SB(s));
 #ifdef CONFIG_QUOTA
 	{
 		int j;

--
2.23.0