diff options
author | Markus Elfring <[email protected]> | 2019-09-25 16:47:24 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2019-09-25 17:51:40 -0700 |
commit | aadc4e01dbaaccd38abde03bc84d0332a6bd9eab (patch) | |
tree | 0454a095f5c5ee15c2c55773b7bb8debab51b0b9 | |
parent | b25bab17221ba366ffdff9dd62945932aac7dc98 (diff) |
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]>
-rw-r--r-- | fs/fat/dir.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/fat/dir.c b/fs/fat/dir.c index 814ad2c2ba80..054acd9fd033 100644 --- a/fs/fat/dir.c +++ b/fs/fat/dir.c @@ -88,9 +88,7 @@ static int fat__get_entry(struct inode *dir, loff_t *pos, int err, offset; next: - if (*bh) - brelse(*bh); - + brelse(*bh); *bh = NULL; iblock = *pos >> sb->s_blocksize_bits; err = fat_bmap(dir, iblock, &phys, &mapped_blocks, 0, false); |