Skip to contentSkip to conversation

kernfs: mount: Remove unnecessary ‘NULL’ values from knparent

PATCH In review Li zeming 2 participants 2 messages Apr 15, 2024 – Apr 16, 2024 kernfs

lore
Share & tools
lore

Li zeming

author
#0 lore raw

PATCH 1/1 kernfs: mount: Remove unnecessary ‘NULL’ values from knparent

knparent is assigned first, so it does not need to initialize the assignment.

---
 fs/kernfs/mount.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/kernfs/mount.c +1 -1
index 0c93cad0f0aca..d38bc7aeb598c 100644
@@ -206,7 +206,7 @@ struct dentry *kernfs_node_dentry(struct kernfs_node *kn,
 				  struct super_block *sb)
 {
 	struct dentry *dentry;
-	struct kernfs_node *knparent = NULL;
+	struct kernfs_node *knparent;
 
 	BUG_ON(sb->s_op != &kernfs_sops);
 
Signature · 1 line
2.18.2