提交 bb489841 编写于 作者: J Jingoo Han 提交者: Mark Brown

spi: orion: Use devm_clk_get()

Use devm_clk_get() to make cleanup paths simpler.
Signed-off-by: NJingoo Han <jg1.han@samsung.com>
Acked-by: NJason Cooper <jason@lakedaemon.net>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 6ce4eac1
...@@ -434,7 +434,7 @@ static int orion_spi_probe(struct platform_device *pdev) ...@@ -434,7 +434,7 @@ static int orion_spi_probe(struct platform_device *pdev)
spi = spi_master_get_devdata(master); spi = spi_master_get_devdata(master);
spi->master = master; spi->master = master;
spi->clk = clk_get(&pdev->dev, NULL); spi->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(spi->clk)) { if (IS_ERR(spi->clk)) {
status = PTR_ERR(spi->clk); status = PTR_ERR(spi->clk);
goto out; goto out;
...@@ -465,7 +465,6 @@ static int orion_spi_probe(struct platform_device *pdev) ...@@ -465,7 +465,6 @@ static int orion_spi_probe(struct platform_device *pdev)
out_rel_clk: out_rel_clk:
clk_disable_unprepare(spi->clk); clk_disable_unprepare(spi->clk);
clk_put(spi->clk);
out: out:
spi_master_put(master); spi_master_put(master);
return status; return status;
...@@ -481,7 +480,6 @@ static int orion_spi_remove(struct platform_device *pdev) ...@@ -481,7 +480,6 @@ static int orion_spi_remove(struct platform_device *pdev)
spi = spi_master_get_devdata(master); spi = spi_master_get_devdata(master);
clk_disable_unprepare(spi->clk); clk_disable_unprepare(spi->clk);
clk_put(spi->clk);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册