diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2019-09-03 14:40:18 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2019-09-04 18:19:43 +0200 |
commit | 18c2433cb8af4938bee01a766a2389f80e73d4ae (patch) | |
tree | 1f5e54fe7f3c2955a502f93a57ad172fb7ac0c9a | |
parent | 8b47ea6c21cbf169c4c41ad6de1ac12fba5ddd8e (diff) | |
download | linux-18c2433cb8af4938bee01a766a2389f80e73d4ae.tar.bz2 |
ext2: Delete an unnecessary check before brelse()
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 <elfring@users.sourceforge.net>
Link: https://lore.kernel.org/r/51dea296-2207-ebc0-bac3-13f3e5c3b235@web.de
Signed-off-by: Jan Kara <jack@suse.cz>
-rw-r--r-- | fs/ext2/super.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 44eb6e7eb492..f4d5c624c4dc 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c @@ -162,8 +162,7 @@ static void ext2_put_super (struct super_block * sb) } db_count = sbi->s_gdb_count; for (i = 0; i < db_count; i++) - if (sbi->s_group_desc[i]) - brelse (sbi->s_group_desc[i]); + brelse(sbi->s_group_desc[i]); kfree(sbi->s_group_desc); kfree(sbi->s_debts); percpu_counter_destroy(&sbi->s_freeblocks_counter); |