[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f1d3f6d26c2731050b4be90c32397c62e4dc31a8.1540970653.git.matti.vaittinen@fi.rohmeurope.com>
Date: Wed, 31 Oct 2018 10:31:48 +0200
From: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
To: Jonathan Corbet <corbet@....net>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
Chanwoo Choi <cw00.choi@...sung.com>,
Krzysztof Kozlowski <krzk@...nel.org>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
Russell King <linux@...linux.org.uk>,
Andy Gross <andy.gross@...aro.org>,
David Brown <david.brown@...aro.org>,
Kukjin Kim <kgene@...nel.org>,
Sylwester Nawrocki <s.nawrocki@...sung.com>,
Tomasz Figa <tomasz.figa@...il.com>,
Andrey Smirnov <andrew.smirnov@...il.com>,
Sebastian Reichel <sre@...nel.org>,
Guenter Roeck <linux@...ck-us.net>,
Rob Herring <robh@...nel.org>,
Matti Vaittinen <matti.vaittinen@...rohmeurope.com>,
Huang Shijie <sjhuang@...vatar.ai>,
Akshu Agrawal <Akshu.Agrawal@....com>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Daniel Kurtz <djkurtz@...omium.org>, mazziesaccount@...il.com
Cc: linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-clk@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-arm-msm@...r.kernel.org, linux-soc@...r.kernel.org,
linux-samsung-soc@...r.kernel.org,
matti.vaittinen@...rohmeurope.com
Subject: [PATCH 3/8] clk: clk-s3c2410-dclk: clean up clkdev lookup leak
Use devm variant of clkdev lookup registration in order to avoid
clkdev lookup leak at device remove.
Signed-off-by: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
---
drivers/clk/samsung/clk-s3c2410-dclk.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/clk/samsung/clk-s3c2410-dclk.c b/drivers/clk/samsung/clk-s3c2410-dclk.c
index 0d92f3e5e3d9..07798debfec4 100644
--- a/drivers/clk/samsung/clk-s3c2410-dclk.c
+++ b/drivers/clk/samsung/clk-s3c2410-dclk.c
@@ -309,16 +309,17 @@ static int s3c24xx_dclk_probe(struct platform_device *pdev)
goto err_clk_register;
}
- ret = clk_hw_register_clkdev(clk_table[MUX_DCLK0], "dclk0", NULL);
+ ret = devm_clk_hw_register_clkdev(&pdev->dev, clk_table[MUX_DCLK0],
+ "dclk0", NULL);
if (!ret)
- ret = clk_hw_register_clkdev(clk_table[MUX_DCLK1], "dclk1",
- NULL);
+ ret = devm_clk_hw_register_clkdev(&pdev->dev,
+ clk_table[MUX_DCLK1], "dclk1", NULL);
if (!ret)
- ret = clk_hw_register_clkdev(clk_table[MUX_CLKOUT0],
- "clkout0", NULL);
+ ret = devm_clk_hw_register_clkdev(&pdev->dev,
+ clk_table[MUX_CLKOUT0], "clkout0", NULL);
if (!ret)
- ret = clk_hw_register_clkdev(clk_table[MUX_CLKOUT1],
- "clkout1", NULL);
+ ret = devm_clk_hw_register_clkdev(&pdev->dev,
+ clk_table[MUX_CLKOUT1], "clkout1", NULL);
if (ret) {
dev_err(&pdev->dev, "failed to register aliases, %d\n", ret);
goto err_clk_register;
--
2.14.3
Powered by blists - more mailing lists