Skip to content

Commit

Permalink
pata_arasan_cf: add missing clk_disable_unprepare() on error path
Browse files Browse the repository at this point in the history
Add the missing clk_disable_unprepare() before return from cf_init()
in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
  • Loading branch information
Wei Yongjun authored and Tejun Heo committed Nov 22, 2013
1 parent 2435dcb commit 6c9e149
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/ata/pata_arasan_cf.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ static int cf_init(struct arasan_cf_dev *acdev)
ret = clk_set_rate(acdev->clk, 166000000);
if (ret) {
dev_warn(acdev->host->dev, "clock set rate failed");
clk_disable_unprepare(acdev->clk);
return ret;
}

Expand Down

0 comments on commit 6c9e149

Please sign in to comment.