Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e07f544c authored by Kyle Yan's avatar Kyle Yan Committed by Gerrit - the friendly Code Review server
Browse files

Merge "iommu: msm: use list_for_each_entry_safe for deletion" into msm-4.9

parents f5b6935b 35225890
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -347,10 +347,12 @@ int msm_dma_unmap_all_for_dev(struct device *dev)
	meta_node = rb_first(root);
	while (meta_node) {
		struct msm_iommu_map *iommu_map;
		struct msm_iommu_map *iommu_map_next;

		meta = rb_entry(meta_node, struct msm_iommu_meta, node);
		mutex_lock(&meta->lock);
		list_for_each_entry(iommu_map, &meta->iommu_maps, lnode)
		list_for_each_entry_safe(iommu_map, iommu_map_next,
						&meta->iommu_maps, lnode)
			if (iommu_map->dev == dev)
				if (!kref_put(&iommu_map->ref,
						msm_iommu_map_release))