|
@@ -1938,6 +1938,7 @@ error_csi2:
|
|
|
|
|
|
static void isp_detach_iommu(struct isp_device *isp)
|
|
|
{
|
|
|
+ arm_iommu_detach_device(isp->dev);
|
|
|
arm_iommu_release_mapping(isp->mapping);
|
|
|
isp->mapping = NULL;
|
|
|
}
|
|
@@ -1954,8 +1955,7 @@ static int isp_attach_iommu(struct isp_device *isp)
|
|
|
mapping = arm_iommu_create_mapping(&platform_bus_type, SZ_1G, SZ_2G);
|
|
|
if (IS_ERR(mapping)) {
|
|
|
dev_err(isp->dev, "failed to create ARM IOMMU mapping\n");
|
|
|
- ret = PTR_ERR(mapping);
|
|
|
- goto error;
|
|
|
+ return PTR_ERR(mapping);
|
|
|
}
|
|
|
|
|
|
isp->mapping = mapping;
|
|
@@ -1970,7 +1970,8 @@ static int isp_attach_iommu(struct isp_device *isp)
|
|
|
return 0;
|
|
|
|
|
|
error:
|
|
|
- isp_detach_iommu(isp);
|
|
|
+ arm_iommu_release_mapping(isp->mapping);
|
|
|
+ isp->mapping = NULL;
|
|
|
return ret;
|
|
|
}
|
|
|
|