[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230705130416.46710-3-frank.li@vivo.com>
Date: Wed, 5 Jul 2023 21:04:13 +0800
From: Yangtao Li <frank.li@...o.com>
To: Andy Gross <agross@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>,
Robin Murphy <robin.murphy@....com>
Cc: Yangtao Li <frank.li@...o.com>, linux-arm-msm@...r.kernel.org,
iommu@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: [PATCH 3/6] iommu/msm: do some cleanup
Convert to devm_platform_get_and_ioremap_resource(), remove redundant msg
and fix return value when platform_get_irq fails.
Signed-off-by: Yangtao Li <frank.li@...o.com>
---
drivers/iommu/msm_iommu.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/iommu/msm_iommu.c b/drivers/iommu/msm_iommu.c
index 79d89bad5132..349b46b4b714 100644
--- a/drivers/iommu/msm_iommu.c
+++ b/drivers/iommu/msm_iommu.c
@@ -735,17 +735,16 @@ static int msm_iommu_probe(struct platform_device *pdev)
return dev_err_probe(iommu->dev, ret, "could not prepare iommu_clk\n");
}
- r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- iommu->base = devm_ioremap_resource(iommu->dev, r);
+ iommu->base = devm_platform_get_and_ioremap_resource(pdev, 0, &r);
if (IS_ERR(iommu->base)) {
- ret = dev_err_probe(iommu->dev, PTR_ERR(iommu->base), "could not get iommu base\n");
+ ret = PTR_ERR(iommu->base);
goto fail;
}
ioaddr = r->start;
iommu->irq = platform_get_irq(pdev, 0);
if (iommu->irq < 0) {
- ret = -ENODEV;
+ ret = iommu->irq;
goto fail;
}
--
2.39.0
Powered by blists - more mailing lists