[PATCH openEuler-5.10 423/557] net: dsa: bcm_sf2_cfp: fix an incorrect NULL check on list iterator