Skip to content

Commit 43cec30

Browse files
committed
tracefs: Removed unused 'ret' variable in eventfs_iterate()
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). Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://patch.msgid.link/20260414110344.75c0663f@robin Fixes: 4d9b262 ("eventfs: Simplify code using guard()s") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202604100111.AAlbQKmK-lkp@intel.com/ Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 parent e8368d1 commit 43cec30

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

fs/tracefs/event_inode.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,6 @@ static int eventfs_iterate(struct file *file, struct dir_context *ctx)
574574
struct eventfs_inode *ei;
575575
const char *name;
576576
umode_t mode;
577-
int ret = -EINVAL;
578577
int ino;
579578
int i, r, c;
580579

@@ -599,7 +598,6 @@ static int eventfs_iterate(struct file *file, struct dir_context *ctx)
599598
* Need to create the dentries and inodes to have a consistent
600599
* inode number.
601600
*/
602-
ret = 0;
603601

604602
/* Start at 'c' to jump over already read entries */
605603
for (i = c; i < ei->nr_entries; i++, ctx->pos++) {

0 commit comments

Comments
 (0)