]> git.sur5r.net Git - u-boot/blobdiff - fs/yaffs2/yaffs_guts.c
yaffs2: iterator variable cannot be NULL
[u-boot] / fs / yaffs2 / yaffs_guts.c
index bbe0d700fb63e8d7754d37163dbbaef45745daa3..c8b27adda91dee49989013366bc3de98bc42868d 100644 (file)
@@ -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;
                        }