diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2016-09-19 23:28:05 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-09-19 23:28:04 -0700 |
| commit | 9969c77475f30a7584d9dc20192c42db9aeee13c (patch) | |
| tree | 021699330ae834eb5fe245d0887c67213dbc0b39 | |
| parent | 64a9ffd418bf91617dad9faf5e34f2488c1c29ca (diff) | |
| parent | b8bfe5bcc151c5b033a34ebf8a9a0b4e2af9d67f (diff) | |
Merge "iommu: msm: use list_for_each_entry_safe for deletion"
| -rw-r--r-- | drivers/iommu/msm_dma_iommu_mapping.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/iommu/msm_dma_iommu_mapping.c b/drivers/iommu/msm_dma_iommu_mapping.c index a035ebd5af7e..334f4e95c068 100644 --- a/drivers/iommu/msm_dma_iommu_mapping.c +++ b/drivers/iommu/msm_dma_iommu_mapping.c @@ -358,10 +358,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)) |
