summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2019-01-04 01:38:29 +0000
committerJaegeuk Kim <jaegeuk@kernel.org>2019-01-08 09:34:27 -0800
commit8e11403876b1e29d290ea42bb20bf45ef927ef6e (patch)
treea88dfc752a5a40c1ac61188ed052126c088a72cc
parent539cd352239f6acae4a7997bf31edca5c9a69c81 (diff)
f2fs: remove set but not used variable 'err'
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> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r--fs/f2fs/data.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index f91d8630c9a2..4e402add2e60 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;