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: 4d9b262031 ("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>
This commit is contained in:
Steven Rostedt
2026-04-14 11:03:44 -04:00
committed by Steven Rostedt (Google)
parent e8368d1f4b
commit 43cec30c44

View File

@@ -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++) {