Skip to content

Commit

Permalink
fs-udf: Delete an unnecessary check before brelse()
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
elfring authored and jankara committed Sep 4, 2019
1 parent 18c2433 commit 4eb09e1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/udf/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 4eb09e1

Please sign in to comment.