[PATCH v2] iommu: fix an incorrect NULL check on list iterator