lkml.org 
[lkml]   [2022]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] fs/buffer.c: remove unneeded code
Date
From: Lv Ruyi <lv.ruyi@zte.com.cn>

fix clang warning: Value stored to 'err' is never read in line 2944.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
---
fs/buffer.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/fs/buffer.c b/fs/buffer.c
index bfc566de36e5..b2045871e81c 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -2941,7 +2941,6 @@ int block_truncate_page(struct address_space *mapping,
pos += blocksize;
}

- err = 0;
if (!buffer_mapped(bh)) {
WARN_ON(bh->b_size != blocksize);
err = get_block(inode, iblock, bh, 0);
--
2.25.1
\
 
 \ /
  Last update: 2022-04-02 10:48    [W:0.083 / U:1.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site