From: Janghyuck Kim Date: Wed, 1 Jun 2016 05:13:13 +0000 (+0900) Subject: [COMMON] iommu/exynos: fix return value in attach_dev X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e57b080905385940b7f2e4a6c3cf709169f5f4e3;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] iommu/exynos: fix return value in attach_dev IOMMU framework considers error if attach_dev returns non-zero value. If sysmmu is already enabled by other master device, return value can be one, which means already enabled. It is normal situation, so return value is changed to zero in this case. Change-Id: I4a344cedc2d3729de3b46c9c1cf0f6e44072d2a5 Signed-off-by: Janghyuck Kim --- diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 1eb9ba95d72b..f85ee4677a33 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos-iommu.c @@ -735,7 +735,7 @@ static int exynos_iommu_attach_device(struct iommu_domain *iommu_domain, dev_dbg(master, "%s: Attached IOMMU with pgtable %pa %s\n", __func__, &pagetable, (ret == 0) ? "" : ", again"); - return ret; + return 0; } static void exynos_iommu_detach_device(struct iommu_domain *iommu_domain,