befs: Delete an unnecessary check before brelse()
Subsystems (2)
PATCH 1/1 befs: Delete an unnecessary check before brelse()
From: Markus Elfring <[email protected]>
Date: Tue, 3 Sep 2019 14:04:05 +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]>
--- fs/befs/btree.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
fs/befs/btree.c +1 -4
@@ -194,10 +194,7 @@ befs_bt_read_node(struct super_block *sb, const befs_data_stream *ds,uint off =0 ;befs_debug (sb,"---> %s" , __func__); - -if (node->bh) -brelse (node->bh); - +brelse (node->bh); node->bh =befs_read_datastream (sb, ds, node_off, &off);if (!node->bh) { befs_error(sb, "%s failed to read "
--
2.23.0