lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <20221126111634.1994-1-thunder.leizhen@huawei.com> Date: Sat, 26 Nov 2022 19:16:34 +0800 From: Zhen Lei <thunder.leizhen@...wei.com> To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Tejun Heo <tj@...nel.org>, <linux-kernel@...r.kernel.org> CC: Zhen Lei <thunder.leizhen@...wei.com> Subject: [PATCH v2] kernfs: remove an unused if statement in kernfs_path_from_node_locked() It makes no sense to call kernfs_path_from_node_locked() with NULL buf, and no one is doing that right now. Suggested-by: Tejun Heo <tj@...nel.org> Signed-off-by: Zhen Lei <thunder.leizhen@...wei.com> --- fs/kernfs/dir.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c index f33b3baad07cb36..8a11bf189970274 100644 --- a/fs/kernfs/dir.c +++ b/fs/kernfs/dir.c @@ -149,9 +149,6 @@ static int kernfs_path_from_node_locked(struct kernfs_node *kn_to, if (kn_from == kn_to) return strlcpy(buf, "/", buflen); - if (!buf) - return -EINVAL; - common = kernfs_common_ancestor(kn_from, kn_to); if (WARN_ON(!common)) return -EINVAL; -- 2.25.1
Powered by blists - more mailing lists