Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1645511
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v1] PM / devfreq: exynos-ppmu : Handle return value of clk_prepare_enable |
| Date | 2017-05-19 13:00 +0200 |
| Message-ID | <tINNw-Zy-7@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
clk_prepare_enable() can fail here and we must check its return value.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/devfreq/event/exynos-ppmu.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
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;
}
--
1.9.1
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH v1] PM / devfreq: exynos-ppmu : Handle return value of clk_prepare_enable Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-05-19 13:00 +0200
Re: [PATCH v1] PM / devfreq: exynos-ppmu : Handle return value of clk_prepare_enable Chanwoo Choi <cw00.choi@samsung.com> - 2017-05-23 11:50 +0200
RE: Re: [PATCH v1] PM / devfreq: exynos-ppmu : Handle return value of clk_prepare_enable MyungJoo Ham <myungjoo.ham@samsung.com> - 2017-05-24 03:40 +0200
Re: [PATCH v1] PM / devfreq: exynos-ppmu : Handle return value of clk_prepare_enable Chanwoo Choi <cw00.choi@samsung.com> - 2017-05-24 04:00 +0200
csiph-web