* [PATCH v1] PM / devfreq: exynos-nocp : Handle return value of clk_prepare_enable
@ 2017-05-19 10:50 ` Arvind Yadav
2017-05-23 9:43 ` Chanwoo Choi
0 siblings, 1 reply; 3+ messages in thread
From: Arvind Yadav @ 2017-05-19 10:50 UTC (permalink / raw)
To: linux-arm-kernel
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-nocp.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/devfreq/event/exynos-nocp.c b/drivers/devfreq/event/exynos-nocp.c
index 5c3e7b1..f6e7956 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));
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v1] PM / devfreq: exynos-nocp : Handle return value of clk_prepare_enable
2017-05-19 10:50 ` [PATCH v1] PM / devfreq: exynos-nocp : Handle return value of clk_prepare_enable Arvind Yadav
@ 2017-05-23 9:43 ` Chanwoo Choi
2017-05-24 1:56 ` Chanwoo Choi
0 siblings, 1 reply; 3+ messages in thread
From: Chanwoo Choi @ 2017-05-23 9:43 UTC (permalink / raw)
To: linux-arm-kernel
Hi Arvind,
On 2017? 05? 19? 19:50, Arvind Yadav wrote:
> 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-nocp.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/devfreq/event/exynos-nocp.c b/drivers/devfreq/event/exynos-nocp.c
> index 5c3e7b1..f6e7956 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;
> + }
I already replied from the similar patch. Thanks.
>
> pr_info("exynos-nocp: new NoC Probe device registered: %s\n",
> dev_name(dev));
>
--
Best Regards,
Chanwoo Choi
Samsung Electronics
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v1] PM / devfreq: exynos-nocp : Handle return value of clk_prepare_enable
2017-05-23 9:43 ` Chanwoo Choi
@ 2017-05-24 1:56 ` Chanwoo Choi
0 siblings, 0 replies; 3+ messages in thread
From: Chanwoo Choi @ 2017-05-24 1:56 UTC (permalink / raw)
To: linux-arm-kernel
On 2017? 05? 23? 18:43, Chanwoo Choi wrote:
> Hi Arvind,
>
> On 2017? 05? 19? 19:50, Arvind Yadav wrote:
>> 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-nocp.c | 6 +++++-
>> 1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/devfreq/event/exynos-nocp.c b/drivers/devfreq/event/exynos-nocp.c
>> index 5c3e7b1..f6e7956 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;
>> + }
>
> I already replied from the similar patch. Thanks.
>
>>
>> pr_info("exynos-nocp: new NoC Probe device registered: %s\n",
>> dev_name(dev));
>>
>
>
I'm missing some point that if there is no clock
this driver initializes 'nocp->clk = NULL;' on 217 line.
Looks good to me.
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
--
Best Regards,
Chanwoo Choi
Samsung Electronics
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-05-24 1:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20170519105215epcas5p26e75138ae5815f288ac6ca57a64c1087@epcas5p2.samsung.com>
2017-05-19 10:50 ` [PATCH v1] PM / devfreq: exynos-nocp : Handle return value of clk_prepare_enable Arvind Yadav
2017-05-23 9:43 ` Chanwoo Choi
2017-05-24 1:56 ` Chanwoo Choi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).