]> Git Repo - linux.git/commitdiff
fs-udf: Delete an unnecessary check before brelse()
authorMarkus Elfring <[email protected]>
Tue, 3 Sep 2019 19:12:09 +0000 (21:12 +0200)
committerJan Kara <[email protected]>
Wed, 4 Sep 2019 16:19:43 +0000 (18:19 +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]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jan Kara <[email protected]>
fs/udf/super.c

index 7ab29124961cb8d058cd47ca02e868964c7ed61b..8c28e93e9b73033e3e738bd53c190bada611dbfb 100644 (file)
@@ -269,8 +269,7 @@ static void udf_sb_free_bitmap(struct udf_bitmap *bitmap)
        int nr_groups = bitmap->s_nr_groups;
 
        for (i = 0; i < nr_groups; i++)
-               if (bitmap->s_block_bitmap[i])
-                       brelse(bitmap->s_block_bitmap[i]);
+               brelse(bitmap->s_block_bitmap[i]);
 
        kvfree(bitmap);
 }
This page took 0.054173 seconds and 4 git commands to generate.