Skip to contentSkip to conversation

autofs: remove redundant assignment to variable err

PATCH Superseded Colin King 2 participants 2 messages Sep 1, 2019

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 autofs: remove redundant assignment to variable err

From: Colin Ian King <[email protected]>

Variable err is being assigned a value that is never read and is being re-assigned a little later on. The assignment is redundant and hence can be removed.

Addresses-Coverity: ("Ununsed value")

---
 fs/autofs/dev-ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/autofs/dev-ioctl.c +1 -1
index a3cdb0036c5d..65d84b4d4464 100644
@@ -422,7 +422,7 @@ static int autofs_dev_ioctl_requester(struct file *fp,
 	struct autofs_info *ino;
 	struct path path;
 	dev_t devid;
-	int err = -ENOENT;
+	int err;
 
 	/* param->path has been checked in validate_dev_ioctl() */
 
Signature · 1 line
2.20.1
#1 lore raw

Le 01/09/2019 à 17:22, Colin King a écrit :

Quoted 7 lines

From: Colin Ian King <[email protected]>

Variable err is being assigned a value that is never read and is being re-assigned a little later on. The assignment is redundant and hence can be removed.

Addresses-Coverity: ("Ununsed value")

Ununsed?

Quoted 18 lines
---
  fs/autofs/dev-ioctl.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
fs/autofs/dev-ioctl.c +1 -1
index a3cdb0036c5d..65d84b4d4464 100644
@@ -422,7 +422,7 @@ static int autofs_dev_ioctl_requester(struct file *fp,
  	struct autofs_info *ino;
  	struct path path;
  	dev_t devid;
-	int err = -ENOENT;
+	int err;
 
  	/* param->path has been checked in validate_dev_ioctl() */