f2fs: remove redundant assignment to variable err
authorColin Ian King <colin.king@canonical.com>
Mon, 20 Apr 2020 22:00:57 +0000 (23:00 +0100)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 12 May 2020 03:37:13 +0000 (20:37 -0700)
The variable err is being assigned with a value that is never read
and it is being updated later with a new value. The initialization is
redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/namei.c

index 58db1de7ca947663f26bb9acf051569af7c2e24e..63b34a161cf48d3635c69432316fac4b12bba6b2 100644 (file)
@@ -564,7 +564,7 @@ static int f2fs_unlink(struct inode *dir, struct dentry *dentry)
        struct inode *inode = d_inode(dentry);
        struct f2fs_dir_entry *de;
        struct page *page;
-       int err = -ENOENT;
+       int err;
 
        trace_f2fs_unlink_enter(dir, dentry);