diff --git a/fs/proc/generic.c b/fs/proc/generic.c index 64e9ee1b129e22..08ad8e8fe68f29 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c @@ -382,7 +382,7 @@ static struct proc_dir_entry *__proc_create(struct proc_dir_entry **parent, struct qstr qstr; if (xlate_proc_name(name, parent, &fn) != 0) - goto out; + return ent; qstr.name = fn; qstr.len = strlen(fn); if (qstr.len == 0 || qstr.len >= 256) { @@ -408,7 +408,7 @@ static struct proc_dir_entry *__proc_create(struct proc_dir_entry **parent, ent = kmem_cache_zalloc(proc_dir_entry_cache, GFP_KERNEL); if (!ent) - goto out; + return ent; if (qstr.len + 1 <= SIZEOF_PDE_INLINE_NAME) { ent->name = ent->inline_name; @@ -432,7 +432,6 @@ static struct proc_dir_entry *__proc_create(struct proc_dir_entry **parent, ent->proc_dops = &proc_misc_dentry_ops; -out: return ent; }