Commit 25effc36 authored by Jingoo Han's avatar Jingoo Han Committed by Jeff Garzik

pata_samsung_cf: Use devm_clk_get()

Use devm_clk_get() rather than clk_get() to make cleanup paths
more simple.
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 803739d2
...@@ -512,7 +512,7 @@ static int __init pata_s3c_probe(struct platform_device *pdev) ...@@ -512,7 +512,7 @@ static int __init pata_s3c_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
} }
info->clk = clk_get(&pdev->dev, "cfcon"); info->clk = devm_clk_get(&pdev->dev, "cfcon");
if (IS_ERR(info->clk)) { if (IS_ERR(info->clk)) {
dev_err(dev, "failed to get access to cf controller clock\n"); dev_err(dev, "failed to get access to cf controller clock\n");
ret = PTR_ERR(info->clk); ret = PTR_ERR(info->clk);
...@@ -589,7 +589,6 @@ static int __init pata_s3c_probe(struct platform_device *pdev) ...@@ -589,7 +589,6 @@ static int __init pata_s3c_probe(struct platform_device *pdev)
stop_clk: stop_clk:
clk_disable(info->clk); clk_disable(info->clk);
clk_put(info->clk);
return ret; return ret;
} }
...@@ -601,7 +600,6 @@ static int __exit pata_s3c_remove(struct platform_device *pdev) ...@@ -601,7 +600,6 @@ static int __exit pata_s3c_remove(struct platform_device *pdev)
ata_host_detach(host); ata_host_detach(host);
clk_disable(info->clk); clk_disable(info->clk);
clk_put(info->clk);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment