[patch] thermal: rockchip: fix an error code
Doug Anderson
dianders at chromium.org
Mon Apr 27 10:50:14 PDT 2015
Dan,
On Tue, Apr 21, 2015 at 2:34 AM, Dan Carpenter <dan.carpenter at 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 at 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 at chromium.org>
More information about the Linux-rockchip
mailing list