Skip to content

Commit 25effc3

Browse files
Jingoo HanJeff Garzik
authored andcommitted
pata_samsung_cf: Use devm_clk_get()
Use devm_clk_get() rather than clk_get() to make cleanup paths more simple. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
1 parent 803739d commit 25effc3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/ata/pata_samsung_cf.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ static int __init pata_s3c_probe(struct platform_device *pdev)
512512
return -ENOMEM;
513513
}
514514

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

590590
stop_clk:
591591
clk_disable(info->clk);
592-
clk_put(info->clk);
593592
return ret;
594593
}
595594

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

603602
clk_disable(info->clk);
604-
clk_put(info->clk);
605603

606604
return 0;
607605
}

0 commit comments

Comments
 (0)