
The iterator variable of list_for_each is never NULL.
Signed-off-by: Heinrich Schuchardt xypron.glpk@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); }
}