summaryrefslogtreecommitdiffstats
path: root/fs/yaffs2/yaffs_guts.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2018-03-08 22:52:29 +0100
committerTom Rini <trini@konsulko.com>2018-03-09 12:31:06 -0500
commit428e60e079ba700dad3d883ec12653f1a5cedea6 (patch)
treebdc41af00ed32aa159baa8c9d8d8b047b2d6574c /fs/yaffs2/yaffs_guts.c
parentc9bf43dd9d49c5024a9a361b5168ef664186c22a (diff)
downloadu-boot-428e60e079ba700dad3d883ec12653f1a5cedea6.tar.gz
u-boot-428e60e079ba700dad3d883ec12653f1a5cedea6.tar.xz
u-boot-428e60e079ba700dad3d883ec12653f1a5cedea6.zip
yaffs2: iterator variable cannot be NULL
The iterator of list_for_each() is never NULL. Identified with coccinelle. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'fs/yaffs2/yaffs_guts.c')
-rw-r--r--fs/yaffs2/yaffs_guts.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/yaffs2/yaffs_guts.c b/fs/yaffs2/yaffs_guts.c
index bbe0d700fb..c8b27adda9 100644
--- a/fs/yaffs2/yaffs_guts.c
+++ b/fs/yaffs2/yaffs_guts.c
@@ -1872,8 +1872,8 @@ static int yaffs_new_obj_id(struct yaffs_dev *dev)
n += YAFFS_NOBJECT_BUCKETS;
list_for_each(i, &dev->obj_bucket[bucket].list) {
/* If there is already one in the list */
- if (i && list_entry(i, struct yaffs_obj,
- hash_link)->obj_id == n) {
+ if (list_entry(i, struct yaffs_obj,
+ hash_link)->obj_id == n) {
found = 0;
break;
}