[U-Boot] [PATCH 1/1] yaffs2: iterator variable cannot be NULL
Heinrich Schuchardt
xypron.glpk at gmx.de
Wed Nov 8 22:32:45 UTC 2017
The iterator variable of list_for_each is never NULL.
Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
fs/yaffs2/yaffsfs.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/fs/yaffs2/yaffsfs.c b/fs/yaffs2/yaffsfs.c
index ba76a5ccdb..47abc6beda 100644
--- a/fs/yaffs2/yaffsfs.c
+++ b/fs/yaffs2/yaffsfs.c
@@ -2847,12 +2847,9 @@ static void yaffsfs_RemoveObjectCallback(struct yaffs_obj *obj)
* the next one to prevent a hanging ptr.
*/
list_for_each(i, &search_contexts) {
- if (i) {
- dsc = list_entry(i, struct yaffsfs_DirSearchContxt,
- others);
- if (dsc->nextReturn == obj)
- yaffsfs_DirAdvance(dsc);
- }
+ dsc = list_entry(i, struct yaffsfs_DirSearchContxt, others);
+ if (dsc->nextReturn == obj)
+ yaffsfs_DirAdvance(dsc);
}
}
--
2.14.2
More information about the U-Boot
mailing list