[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20230420091121.28642-1-gehao@kylinos.cn>
Date: Thu, 20 Apr 2023 17:11:21 +0800
From: Hao Ge <gehao@...inos.cn>
To: sboyd@...nel.org, mturquette@...libre.com, matthias.bgg@...il.com
Cc: gehao@...inos.cn, linux-arm-kernel@...ts.infradead.org,
linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mediatek@...ts.infradead.org, gehao618@....com
Subject: [PATCH V2] mediatek/clk-mt8173-apmixedsys: convert to devm_platform_ioremap_resource
Use devm_platform_ioremap_resource to take the place of of_iomap for
avoid that we don't called iounmap when return some error or remove
device.
Signed-off-by: Hao Ge <gehao@...inos.cn>
Suggested-by: Stephen Boyd <sboyd@...nel.org>
---
v2: fix error handle condition for devm_platform_ioremap_resource
---
drivers/clk/mediatek/clk-mt8173-apmixedsys.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/mediatek/clk-mt8173-apmixedsys.c b/drivers/clk/mediatek/clk-mt8173-apmixedsys.c
index a56c5845d07a..73c29d1dccc6 100644
--- a/drivers/clk/mediatek/clk-mt8173-apmixedsys.c
+++ b/drivers/clk/mediatek/clk-mt8173-apmixedsys.c
@@ -90,8 +90,8 @@ static int clk_mt8173_apmixed_probe(struct platform_device *pdev)
struct clk_hw *hw;
int r;
- base = of_iomap(node, 0);
- if (!base)
+ base = devm_platform_ioremap_resource(pdev, 0);
+ if (IS_ERR(base))
return PTR_ERR(base);
clk_data = mtk_alloc_clk_data(CLK_APMIXED_NR_CLK);
--
2.25.1
No virus found
Checked by Hillstone Network AntiVirus
Powered by blists - more mailing lists