diff options
author | Heinrich Schuchardt | 2018-03-08 22:52:29 +0100 |
---|---|---|
committer | Tom Rini | 2018-03-09 12:31:06 -0500 |
commit | 428e60e079ba700dad3d883ec12653f1a5cedea6 (patch) | |
tree | bdc41af00ed32aa159baa8c9d8d8b047b2d6574c /fs/yaffs2/yaffsfs.c | |
parent | c9bf43dd9d49c5024a9a361b5168ef664186c22a (diff) |
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/yaffsfs.c')
-rw-r--r-- | fs/yaffs2/yaffsfs.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/yaffs2/yaffsfs.c b/fs/yaffs2/yaffsfs.c index ba76a5ccdbd..47abc6bedae 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); } } |