diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c index dbf12404145e..9b8d4a68daee 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c @@ -3452,6 +3452,14 @@ static int arm_smmu_device_reset(struct arm_smmu_device *smmu, bool bypass) return ret; } + if (smmu->impl_ops && smmu->impl_ops->device_reset) { + ret = smmu->impl_ops->device_reset(smmu); + if (ret) { + dev_err(smmu->dev, "failed to reset impl\n"); + return ret; + } + } + return 0; } @@ -4035,14 +4043,6 @@ static int arm_smmu_device_probe(struct platform_device *pdev) goto err_free_sysfs; } - if (smmu->impl_ops && smmu->impl_ops->device_reset) { - ret = smmu->impl_ops->device_reset(smmu); - if (ret) { - dev_err(smmu->dev, "failed to reset impl\n"); - return ret; - } - } - return 0; err_free_sysfs: