diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2017-05-19 16:26:04 +0530 |
---|---|---|
committer | MyungJoo Ham <myungjoo.ham@samsung.com> | 2017-06-12 10:12:07 +0900 |
commit | 97a6ba5bd0b54544fabe090711fabefc7a703a5f (patch) | |
tree | 355fc092f37cddde6bab3c66bd2b537431da7244 /drivers | |
parent | 973a27c7464231282489b2f14581e33cf29024b8 (diff) | |
download | op-kernel-dev-97a6ba5bd0b54544fabe090711fabefc7a703a5f.zip op-kernel-dev-97a6ba5bd0b54544fabe090711fabefc7a703a5f.tar.gz |
PM / devfreq: exynos-ppmu: 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-ppmu.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c index 9b73509..8f6537a 100644 --- a/drivers/devfreq/event/exynos-ppmu.c +++ b/drivers/devfreq/event/exynos-ppmu.c @@ -648,7 +648,11 @@ static int exynos_ppmu_probe(struct platform_device *pdev) dev_name(&pdev->dev), desc[i].name); } - clk_prepare_enable(info->ppmu.clk); + ret = clk_prepare_enable(info->ppmu.clk); + if (ret) { + dev_err(&pdev->dev, "failed to prepare ppmu clock\n"); + return ret; + } return 0; } |