Skip to contentSkip to conversation

tracefs: Removed unused 'ret' variable in eventfs_iterate()

PATCH New Steven Rostedt 1 participant 1 message Apr 14 Tracing

lore
Share & tools
lore

Steven Rostedt

author maintainer
#0 lore raw

PATCH 1/1 tracefs: Removed unused 'ret' variable in eventfs_iterate()

From: Steven Rostedt <[email protected]>

Moving to guard() usage removed the need of using the 'ret' variable but it wasn't removed. As it was set to zero, the compiler in use didn't warn (although some compilers do).

---
 fs/tracefs/event_inode.c | 2 --
 1 file changed, 2 deletions(-)
fs/tracefs/event_inode.c +0 -2
index af8d05df2726..81df94038f2e 100644
@@ -574,7 +574,6 @@ static int eventfs_iterate(struct file *file, struct dir_context *ctx)
 	struct eventfs_inode *ei;
 	const char *name;
 	umode_t mode;
-	int ret = -EINVAL;
 	int ino;
 	int i, r, c;
 
@@ -599,7 +598,6 @@ static int eventfs_iterate(struct file *file, struct dir_context *ctx)
 	 * Need to create the dentries and inodes to have a consistent
 	 * inode number.
 	 */
-	ret = 0;
 
 	/* Start at 'c' to jump over already read entries */
 	for (i = c; i < ei->nr_entries; i++, ctx->pos++) {
Signature · 1 line
2.51.0