[PATCH openEuler-5.10 391/427] stm: ltdc: fix two incorrect NULL checks on list iterator