Skip to content

Commit aadc4e0

Browse files
elfringtorvalds
authored andcommitted
fat: delete an unnecessary check before brelse()
brelse() 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. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Markus Elfring <[email protected]> Acked-by: OGAWA Hirofumi <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent b25bab1 commit aadc4e0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

fs/fat/dir.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,7 @@ static int fat__get_entry(struct inode *dir, loff_t *pos,
8888
int err, offset;
8989

9090
next:
91-
if (*bh)
92-
brelse(*bh);
93-
91+
brelse(*bh);
9492
*bh = NULL;
9593
iblock = *pos >> sb->s_blocksize_bits;
9694
err = fat_bmap(dir, iblock, &phys, &mapped_blocks, 0, false);

0 commit comments

Comments
 (0)