]> git.baikalelectronics.ru Git - kernel.git/commit
iommu: Check return of __iommu_attach_device()
authorShameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Thu, 19 Nov 2020 16:58:46 +0000 (16:58 +0000)
committerWill Deacon <will@kernel.org>
Mon, 23 Nov 2020 14:57:41 +0000 (14:57 +0000)
commit4f02a10a2a5d21c2780262091b113d05e0662379
treec4b7f479a370af81423ea38c8a0dbe109b7543e1
parentf91d49173e1776fe77629c1cbc21a1ef15c258f9
iommu: Check return of __iommu_attach_device()

Currently iommu_create_device_direct_mappings() is called
without checking the return of __iommu_attach_device(). This
may result in failures in iommu driver if dev attach returns
error.

Fixes: 6ef31926e0bd ("iommu: Move iommu_group_create_direct_mappings() out of iommu_group_add_device()")
Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Link: https://lore.kernel.org/r/20201119165846.34180-1-shameerali.kolothum.thodi@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/iommu.c