diff mbox

thermal: rockchip: fix an error code

Message ID 20150421093410.GE12098@mwanda (mailing list archive)
State Accepted, archived
Delegated to: Zhang Rui
Headers show

Commit Message

Dan Carpenter April 21, 2015, 9:34 a.m. UTC
There is a copy and paste bug, "->clk" vs "->pclk", so we return the
wrong error code here.

Fixes: cbac8f639437 ('thermal: rockchip: add driver for thermal')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Caesar Wang April 22, 2015, 3:07 a.m. UTC | #1
? 2015?04?21? 17:34, Dan Carpenter ??:
> There is a copy and paste bug, "->clk" vs "->pclk", so we return the
> wrong error code here.
>
> Fixes: cbac8f639437 ('thermal: rockchip: add driver for thermal')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c
> index 3aa46ac..cd8f5f93 100644
> --- a/drivers/thermal/rockchip_thermal.c
> +++ b/drivers/thermal/rockchip_thermal.c
> @@ -529,7 +529,7 @@ static int rockchip_thermal_probe(struct platform_device *pdev)
>   
>   	thermal->pclk = devm_clk_get(&pdev->dev, "apb_pclk");
>   	if (IS_ERR(thermal->pclk)) {
> -		error = PTR_ERR(thermal->clk);
> +		error = PTR_ERR(thermal->pclk);
Yeah, you are right.
Reviewed-by: Caesar Wang <wxt@rock-chips.com>

Thanks.

Caesar
>   		dev_err(&pdev->dev, "failed to get apb_pclk clock: %d\n",
>   			error);
>   		return error;
>
>
>
Doug Anderson April 27, 2015, 5:50 p.m. UTC | #2
Dan,

On Tue, Apr 21, 2015 at 2:34 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> There is a copy and paste bug, "->clk" vs "->pclk", so we return the
> wrong error code here.
>
> Fixes: cbac8f639437 ('thermal: rockchip: add driver for thermal')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c
> index 3aa46ac..cd8f5f93 100644
> --- a/drivers/thermal/rockchip_thermal.c
> +++ b/drivers/thermal/rockchip_thermal.c
> @@ -529,7 +529,7 @@ static int rockchip_thermal_probe(struct platform_device *pdev)
>
>         thermal->pclk = devm_clk_get(&pdev->dev, "apb_pclk");
>         if (IS_ERR(thermal->pclk)) {
> -               error = PTR_ERR(thermal->clk);
> +               error = PTR_ERR(thermal->pclk);
>                 dev_err(&pdev->dev, "failed to get apb_pclk clock: %d\n",
>                         error);
>                 return error;

Thanks!  :)  An obvious fix, but just in case it helps feel free to add:

Reviewed-by: Doug Anderson <dianders@chromium.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Caesar Wang April 28, 2015, 12:35 a.m. UTC | #3
Dan,

? 2015?04?22? 11:07, Caesar Wang ??:
>
>
> ? 2015?04?21? 17:34, Dan Carpenter ??:
>> There is a copy and paste bug, "->clk" vs "->pclk", so we return the
>> wrong error code here.
>>
>> Fixes: cbac8f639437 ('thermal: rockchip: add driver for thermal')
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>>
>> diff --git a/drivers/thermal/rockchip_thermal.c 
>> b/drivers/thermal/rockchip_thermal.c
>> index 3aa46ac..cd8f5f93 100644
>> --- a/drivers/thermal/rockchip_thermal.c
>> +++ b/drivers/thermal/rockchip_thermal.c
>> @@ -529,7 +529,7 @@ static int rockchip_thermal_probe(struct 
>> platform_device *pdev)
>>         thermal->pclk = devm_clk_get(&pdev->dev, "apb_pclk");
>>       if (IS_ERR(thermal->pclk)) {
>> -        error = PTR_ERR(thermal->clk);
>> +        error = PTR_ERR(thermal->pclk);
> Yeah, you are right.
> Reviewed-by: Caesar Wang <wxt@rock-chips.com>
>

Tested-by: Caesar Wang <wxt@rock-chips.com>

> Thanks.
>
> Caesar
>>           dev_err(&pdev->dev, "failed to get apb_pclk clock: %d\n",
>>               error);
>>           return error;
>>
>>
>>
>
diff mbox

Patch

diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c
index 3aa46ac..cd8f5f93 100644
--- a/drivers/thermal/rockchip_thermal.c
+++ b/drivers/thermal/rockchip_thermal.c
@@ -529,7 +529,7 @@  static int rockchip_thermal_probe(struct platform_device *pdev)
 
 	thermal->pclk = devm_clk_get(&pdev->dev, "apb_pclk");
 	if (IS_ERR(thermal->pclk)) {
-		error = PTR_ERR(thermal->clk);
+		error = PTR_ERR(thermal->pclk);
 		dev_err(&pdev->dev, "failed to get apb_pclk clock: %d\n",
 			error);
 		return error;