* [PATCH -next] f2fs: remove set but not used variable 'err'
@ 2019-01-04 1:38 YueHaibing
2019-01-04 2:37 ` Chao Yu
0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2019-01-04 1:38 UTC (permalink / raw)
To: Jaegeuk Kim, Chao Yu
Cc: YueHaibing, linux-f2fs-devel, linux-kernel, kernel-janitors
Fixes gcc '-Wunused-but-set-variable' warning:
fs/f2fs/data.c: In function 'f2fs_dio_submit_bio':
fs/f2fs/data.c:2585:6: warning:
variable 'err' set but not used [-Wunused-but-set-variable]
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
fs/f2fs/data.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index f91d863..4e402ad 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -2582,14 +2582,11 @@ static void f2fs_dio_submit_bio(struct bio *bio, struct inode *inode,
{
struct f2fs_private_dio *dio;
bool write = (bio_op(bio) == REQ_OP_WRITE);
- int err;
dio = f2fs_kzalloc(F2FS_I_SB(inode),
sizeof(struct f2fs_private_dio), GFP_NOFS);
- if (!dio) {
- err = -ENOMEM;
+ if (!dio)
goto out;
- }
dio->inode = inode;
dio->orig_end_io = bio->bi_end_io;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-04 2:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-04 1:38 [PATCH -next] f2fs: remove set but not used variable 'err' YueHaibing
2019-01-04 2:37 ` Chao Yu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome