crypto: s5p-sss - Use devm_clk_get()

Use devm_clk_get() rather than clk_get() to make cleanup paths
more simple.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Jingoo Han 2013-01-10 11:05:30 +09:00 коммит произвёл Herbert Xu
Родитель f9fb69e73c
Коммит 5c22ba6619
1 изменённых файлов: 1 добавлений и 3 удалений

Просмотреть файл

@ -580,7 +580,7 @@ static int s5p_aes_probe(struct platform_device *pdev)
resource_size(res), pdev->name)) resource_size(res), pdev->name))
return -EBUSY; return -EBUSY;
pdata->clk = clk_get(dev, "secss"); pdata->clk = devm_clk_get(dev, "secss");
if (IS_ERR(pdata->clk)) { if (IS_ERR(pdata->clk)) {
dev_err(dev, "failed to find secss clock source\n"); dev_err(dev, "failed to find secss clock source\n");
return -ENOENT; return -ENOENT;
@ -645,7 +645,6 @@ static int s5p_aes_probe(struct platform_device *pdev)
err_irq: err_irq:
clk_disable(pdata->clk); clk_disable(pdata->clk);
clk_put(pdata->clk);
s5p_dev = NULL; s5p_dev = NULL;
platform_set_drvdata(pdev, NULL); platform_set_drvdata(pdev, NULL);
@ -667,7 +666,6 @@ static int s5p_aes_remove(struct platform_device *pdev)
tasklet_kill(&pdata->tasklet); tasklet_kill(&pdata->tasklet);
clk_disable(pdata->clk); clk_disable(pdata->clk);
clk_put(pdata->clk);
s5p_dev = NULL; s5p_dev = NULL;
platform_set_drvdata(pdev, NULL); platform_set_drvdata(pdev, NULL);