]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
fs: jffs2: Remove always true test master
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Thu, 2 Oct 2025 09:29:14 +0000 (10:29 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 10 Oct 2025 20:27:59 +0000 (14:27 -0600)
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 <andrew.goodbody@linaro.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
fs/jffs2/jffs2_1pass.c

index b5f74d65017a08615db25762b41296a172bc9563..137a9585b0b73cd8e4bb19d7799a54bcf66a359d 100644 (file)
@@ -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);