From: Colin Ian King colin.king@canonical.com
mainline inclusion from mainline-5.15-rc1 commit 3161ad3a717e69b26ea3d73467ed8399023b5075 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA
Reference: https://git.kernel.org/torvalds/linux/c/3161ad3a717e
-------------------------------
The variable err is being initialized 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 Signed-off-by: Namjae Jeon namjae.jeon@samsung.com Signed-off-by: Steve French stfrench@microsoft.com Signed-off-by: Jason Yan yanaijie@huawei.com Signed-off-by: Zhong Jinghua zhongjinghua@huawei.com --- fs/cifsd/vfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/cifsd/vfs.c b/fs/cifsd/vfs.c index 00f80ca45690..3d7413b8f526 100644 --- a/fs/cifsd/vfs.c +++ b/fs/cifsd/vfs.c @@ -587,7 +587,7 @@ int ksmbd_vfs_remove_file(struct ksmbd_work *work, char *name) struct path parent; struct dentry *dir, *dentry; char *last; - int err = -ENOENT; + int err;
last = extract_last_component(name); if (!last)