diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2017-05-19 16:20:35 +0530 |
---|---|---|
committer | MyungJoo Ham <myungjoo.ham@samsung.com> | 2017-06-12 10:12:07 +0900 |
commit | 973a27c7464231282489b2f14581e33cf29024b8 (patch) | |
tree | 0e02cda58902663e55e542e864200aec8828eb65 /drivers | |
parent | 32c1431eea4881a6b17bd7c639315010aeefa452 (diff) | |
download | linux-stable-973a27c7464231282489b2f14581e33cf29024b8.tar.gz linux-stable-973a27c7464231282489b2f14581e33cf29024b8.tar.bz2 linux-stable-973a27c7464231282489b2f14581e33cf29024b8.zip |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/devfreq/event/exynos-nocp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/devfreq/event/exynos-nocp.c b/drivers/devfreq/event/exynos-nocp.c index 5c3e7b11e8a6..f6e7956fc91a 100644 --- a/drivers/devfreq/event/exynos-nocp.c +++ b/drivers/devfreq/event/exynos-nocp.c @@ -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)); |