Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 73d36460 authored by Dan Carpenter's avatar Dan Carpenter Committed by Linus Torvalds
Browse files

proc: cleanup: remove unused assignments



I removed 3 unused assignments.  The first two get reset on the first
statement of their functions.  For "err" in root.c we don't return an
error and we don't use the variable again.

Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Acked-by: default avatarSerge Hallyn <serue@us.ibm.com>
Reviewed-by: default avatarKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b3ac022c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2432,7 +2432,7 @@ static struct dentry *proc_base_instantiate(struct inode *dir,
	const struct pid_entry *p = ptr;
	struct inode *inode;
	struct proc_inode *ei;
	struct dentry *error = ERR_PTR(-EINVAL);
	struct dentry *error;

	/* Allocate the inode */
	error = ERR_PTR(-ENOMEM);
@@ -2782,7 +2782,7 @@ static struct dentry *proc_pid_instantiate(struct inode *dir,

struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd)
{
	struct dentry *result = ERR_PTR(-ENOENT);
	struct dentry *result;
	struct task_struct *task;
	unsigned tgid;
	struct pid_namespace *ns;
+0 −1
Original line number Diff line number Diff line
@@ -110,7 +110,6 @@ void __init proc_root_init(void)
	if (err)
		return;
	proc_mnt = kern_mount_data(&proc_fs_type, &init_pid_ns);
	err = PTR_ERR(proc_mnt);
	if (IS_ERR(proc_mnt)) {
		unregister_filesystem(&proc_fs_type);
		return;