From 48f21e66e360552c75d70a50421d0e0ed1f59e90 Mon Sep 17 00:00:00 2001 From: Andrew Goodbody Date: Thu, 2 Oct 2025 10:29:14 +0100 Subject: [PATCH] fs: jffs2: Remove always true test Testing an unsigned variable to be >= 0 will always be true so remove this redundant test. This issue was found by Smatch. Signed-off-by: Andrew Goodbody Reviewed-by: Quentin Schulz --- fs/jffs2/jffs2_1pass.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c index b5f74d65017..137a9585b0b 100644 --- a/fs/jffs2/jffs2_1pass.c +++ b/fs/jffs2/jffs2_1pass.c @@ -994,14 +994,12 @@ jffs2_1pass_list_inodes(struct b_lists * pL, u32 pino) } } - if (i_version >= 0) { - if (jDir->type == DT_LNK) - jNode = get_node_mem(i_offset, NULL); - else - jNode = get_fl_mem(i_offset, - sizeof(*jNode), - NULL); - } + if (jDir->type == DT_LNK) + jNode = get_node_mem(i_offset, NULL); + else + jNode = get_fl_mem(i_offset, + sizeof(*jNode), + NULL); dump_inode(pL, jDir, jNode); put_fl_mem(jNode, NULL); -- 2.47.3