Messages in this thread | | | From | "Tian, Kevin" <> | Subject | RE: [PATCH v4 1/6] iommu/msm: Fix error-out routine in msm_iommu_attach_dev() | Date | Thu, 22 Sep 2022 08:08:48 +0000 |
| |
> From: Nicolin Chen <nicolinc@nvidia.com> > Sent: Wednesday, September 21, 2022 4:23 PM > > The error-out routine is missing all the reverting pieces for the iop and > attached-ctx allocations. And clock enable/disable is unbalanced too. > > Fix it by adding __disable_clocks() and calling msm_iommu_detach_dev() at > the end of the msm_iommu_attach_dev() if "ret" is non-zero. Also set the > master->num to 0 in the detach_dev() since attach_dev() would check it. > > 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>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
| |