drm/exynos/ipp: traverse ipp drivers list safely
On ipp subsystem removal list of ipp drivers is traversed and their members are deleted. To do it properly safe version of list_for_each* should be used. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
This commit is contained in:
parent
53c5558d95
commit
a36ed46687
|
@ -1605,11 +1605,11 @@ err:
|
||||||
|
|
||||||
static void ipp_subdrv_remove(struct drm_device *drm_dev, struct device *dev)
|
static void ipp_subdrv_remove(struct drm_device *drm_dev, struct device *dev)
|
||||||
{
|
{
|
||||||
struct exynos_drm_ippdrv *ippdrv;
|
struct exynos_drm_ippdrv *ippdrv, *t;
|
||||||
struct ipp_context *ctx = get_ipp_context(dev);
|
struct ipp_context *ctx = get_ipp_context(dev);
|
||||||
|
|
||||||
/* get ipp driver entry */
|
/* get ipp driver entry */
|
||||||
list_for_each_entry(ippdrv, &exynos_drm_ippdrv_list, drv_list) {
|
list_for_each_entry_safe(ippdrv, t, &exynos_drm_ippdrv_list, drv_list) {
|
||||||
if (is_drm_iommu_supported(drm_dev))
|
if (is_drm_iommu_supported(drm_dev))
|
||||||
drm_iommu_detach_device(drm_dev, ippdrv->dev);
|
drm_iommu_detach_device(drm_dev, ippdrv->dev);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue