1
0
Fork 0

PM / devfreq: exynos-nocp: Handle return value of clk_prepare_enable

clk_prepare_enable() can fail here and we must check its return value.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
zero-colors
Arvind Yadav 2017-05-19 16:20:35 +05:30 committed by MyungJoo Ham
parent 32c1431eea
commit 973a27c746
1 changed files with 5 additions and 1 deletions

View File

@ -267,7 +267,11 @@ static int exynos_nocp_probe(struct platform_device *pdev)
}
platform_set_drvdata(pdev, nocp);
clk_prepare_enable(nocp->clk);
ret = clk_prepare_enable(nocp->clk);
if (ret) {
dev_err(&pdev->dev, "failed to prepare ppmu clock\n");
return ret;
}
pr_info("exynos-nocp: new NoC Probe device registered: %s\n",
dev_name(dev));