Skip to content

Commit

Permalink
pata_samsung_cf: Use devm_clk_get()
Browse files Browse the repository at this point in the history
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: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Jingoo Han authored and Jeff Garzik committed Jan 14, 2013
1 parent 803739d commit 25effc3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/ata/pata_samsung_cf.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ static int __init pata_s3c_probe(struct platform_device *pdev)
return -ENOMEM;
}

info->clk = clk_get(&pdev->dev, "cfcon");
info->clk = devm_clk_get(&pdev->dev, "cfcon");
if (IS_ERR(info->clk)) {
dev_err(dev, "failed to get access to cf controller clock\n");
ret = PTR_ERR(info->clk);
Expand Down Expand Up @@ -589,7 +589,6 @@ static int __init pata_s3c_probe(struct platform_device *pdev)

stop_clk:
clk_disable(info->clk);
clk_put(info->clk);
return ret;
}

Expand All @@ -601,7 +600,6 @@ static int __exit pata_s3c_remove(struct platform_device *pdev)
ata_host_detach(host);

clk_disable(info->clk);
clk_put(info->clk);

return 0;
}
Expand Down

0 comments on commit 25effc3

Please sign in to comment.