f2fs: remove set but not used variable 'err'
authorYueHaibing <yuehaibing@huawei.com>
Fri, 4 Jan 2019 01:38:29 +0000 (01:38 +0000)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 8 Jan 2019 17:34:27 +0000 (09:34 -0800)
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>
fs/f2fs/data.c

index f91d8630c9a2d768d365e443811c37a4a1023a1e..4e402add2e603cc09e193caf140d7ddebb8b9613 100644 (file)
@@ -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;