ufs: Delete an unnecessary check before brelse()
PATCH 1/1 ufs: Delete an unnecessary check before brelse()
From: Markus Elfring <[email protected]>
Date: Tue, 3 Sep 2019 21:27:55 +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.
Signed-off-by Markus Elfring <[email protected]>
--- fs/ufs/super.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
fs/ufs/super.c +1 -2
@@ -574,8 +574,7 @@ static int ufs_read_cylinder_structures(struct super_block *sb)kfree (base);if (sbi->s_ucg) {for (i =0 ; i < uspi->s_ncg; i++) -if (sbi->s_ucg[i]) -brelse (sbi->s_ucg[i]); +brelse (sbi->s_ucg[i]);kfree (sbi->s_ucg);for (i =0 ; i <UFS_MAX_GROUP_LOADED ; i++)kfree (sbi->s_ucpi[i]);
--
2.23.0