[PATCH] soc: soc-core: fix a missing check on list iterator