* [PATCH v2 01/13] iommu/msm: Add missing __disable_clocks calls
@ 2022-09-14 5:12 Nicolin Chen
0 siblings, 0 replies; only message in thread
From: Nicolin Chen @ 2022-09-14 5:12 UTC (permalink / raw)
To: agross, bjorn.andersson, konrad.dybcio, joro, will, robin.murphy,
sricharan
Cc: jgg, kevin.tian, linux-arm-msm, iommu, linux-kernel
The clock is not symmetrically disabled in the error-out routines.
Fixes: 109bd48ea2e1 ("iommu/msm: Add DT adaptation")
Cc: stable@vger.kernel.org
Cc: Sricharan R <sricharan@codeaurora.org>
Cc: Andy Gross <agross@kernel.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Konrad Dybcio <konrad.dybcio@somainline.org>
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
---
drivers/iommu/msm_iommu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iommu/msm_iommu.c b/drivers/iommu/msm_iommu.c
index 6a24aa804ea3..a7d41ba4a47b 100644
--- a/drivers/iommu/msm_iommu.c
+++ b/drivers/iommu/msm_iommu.c
@@ -418,6 +418,7 @@ static int msm_iommu_attach_dev(struct iommu_domain *domain, struct device *dev)
list_for_each_entry(master, &iommu->ctx_list, list) {
if (master->num) {
dev_err(dev, "domain already attached");
+ __disable_clocks(iommu);
ret = -EEXIST;
goto fail;
}
@@ -425,6 +426,7 @@ static int msm_iommu_attach_dev(struct iommu_domain *domain, struct device *dev)
msm_iommu_alloc_ctx(iommu->context_map,
0, iommu->ncb);
if (IS_ERR_VALUE(master->num)) {
+ __disable_clocks(iommu);
ret = -ENODEV;
goto fail;
}
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-09-14 5:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-14 5:12 [PATCH v2 01/13] iommu/msm: Add missing __disable_clocks calls Nicolin Chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).