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).
Fixes: 4d9b262031f ("eventfs: Simplify code using guard()s")
Reported-by: kernel test robot <[email protected]>
Closes:
https://lore.kernel.org/oe-kbuild-all/[email protected]/
Signed-off-by: Steven Rostedt (Google) <[email protected]>
---
fs/tracefs/event_inode.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/tracefs/event_inode.c b/fs/tracefs/event_inode.c
index af8d05df2726..81df94038f2e 100644
--- a/fs/tracefs/event_inode.c
+++ b/fs/tracefs/event_inode.c
@@ -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++) {
--
2.51.0