Message ID | 576BC8BC.6090400@arm.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c index 7d3fa9ae8a11..02484dc3f369 100644 --- a/arch/arm64/mm/dma-mapping.c +++ b/arch/arm64/mm/dma-mapping.c @@ -854,10 +854,11 @@ static int __iommu_attach_notifier(struct notifier_block *nb, mutex_lock(&iommu_dma_notifier_lock); list_for_each_entry_safe(master, tmp, &iommu_dma_masters, list) { - if (do_iommu_attach(master->dev, master->ops, - master->dma_base, master->size)) { + if (data == master->dev && do_iommu_attach(master->dev, + master->ops, master->dma_base, master->size)) { list_del(&master->list); kfree(master); + break; } }