All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chanwoo Choi <cw00.choi@samsung.com>
To: Arvind Yadav <arvind.yadav.cs@gmail.com>,
	myungjoo.ham@samsung.com, kyungmin.park@samsung.com,
	krzk@kernel.org, kgene@kernel.org, javier@osg.samsung.com
Cc: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] PM / devfreq: exynos-nocp : Handle return value of clk_prepare_enable
Date: Wed, 24 May 2017 10:56:53 +0900	[thread overview]
Message-ID: <5924E865.6030105@samsung.com> (raw)
In-Reply-To: <59240441.9090208@samsung.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: cw00.choi@samsung.com (Chanwoo Choi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v1] PM / devfreq: exynos-nocp : Handle return value of clk_prepare_enable
Date: Wed, 24 May 2017 10:56:53 +0900	[thread overview]
Message-ID: <5924E865.6030105@samsung.com> (raw)
In-Reply-To: <59240441.9090208@samsung.com>

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

  reply	other threads:[~2017-05-24  1:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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-19 10:50   ` Arvind Yadav
2017-05-23  9:43   ` Chanwoo Choi
2017-05-23  9:43     ` Chanwoo Choi
2017-05-24  1:56     ` Chanwoo Choi [this message]
2017-05-24  1:56       ` Chanwoo Choi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5924E865.6030105@samsung.com \
    --to=cw00.choi@samsung.com \
    --cc=arvind.yadav.cs@gmail.com \
    --cc=javier@osg.samsung.com \
    --cc=kgene@kernel.org \
    --cc=krzk@kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.