[PATCH 5.17 732/772] stm: ltdc: fix two incorrect NULL checks on list iterator